Is there a way to manipulate the size of an array?

Just declare the array to be the maximum expected size and use a separate int variable to indicate how many array elements are actually in use.