First initialize a 5000 element array (Not a Number (NaN) data suggested), then run your acquisition loop and replace the array with the acquired data at index position. This is much more efficient than building the array progressively. Use a feedback node to store the array during execution. Look at the attached vi.
Note that this works with single data points. If you were recording multiple data at each loop iteration, then you would have to calculate the replace position by multiplying the loop iondex with the data length.
Hope this helps !
Chilly Charly (aka CC)