func GrowToCap[Slice ~[]E, E any](s Slice, n int) Slice
GrowToCap grows the slice to at least n elements total capacity.
It is an alternative to slices.Grow that increases the capacity of the slice instead of allowing n new appends.
This is useful when the slice is expected to have nil values.