There's some misconception here, perhaps, that you change the size of an array, but it could also be just the way you worded the problem.
Anyway, the problem here is related to parameter passing.
This line:
SetTargetPos (targetPos);
passes a copy of the reference to the method. This reference refers to the array object in memory.
Inside the method, this line:
targets = new Vector3[targetCount];
Creates a new array of the new required size and assigns that new array object reference to the local parameter variable of that method.
The outside variable is left untouched.
Here, let me show you what I mean.
Before the method call you have these things in memory (with an example array containing 2 elements):
targetPos --> [V1, V2]
Then, when your program is executing and the call to that method is in progress, right inside the method, before we assign anything to targets, we have this scenario:
targetPos ------+
+--> [V1, V2]
targets --------+
We now have 2 variables referring to the same array, one local and one outside. targets thus contains a copy of the reference, it has no relationship with the outside variable.
Thus, when you assign a new array to the local parameter variable you get this scenario (assuming we assign it an array of 3 elements):
targetPos --> [V1, V2]
targets ----> [V1, V2, V3]
You get a new array, and you change the reference in targets to refer to this new array. The outside variable is left as-is, and still refers to the previous array. Nothing you do inside the method will change this.
Except, if you change your method to pass the variable by reference:
private void SetTargetPos(ref Vector3[] targets){
You also need to change how you call it:
SetTargetPos (ref targetPos);
This will now correctly reassign the variable on the outside.
For some more information on parameter passing, you should go read Jon Skeets blog article on parameter passing.