Resizes the array to given size internally. Is used for optimization purposes when the approx. size is known beforehand