The main thing I noticed about your code was that the while loop has no time delay in it other than the amount of time it takes the code in it to execute. I couldn't run the code as it was so I replaced the TCP code with two random number generators and also included my previous suggestions for building the array. When I was finished,I ran it and experienced the same incorrect behavior you were explaining!
I also noticed that my machine seemed to be bogged down. So, I checked it out and sure enough the CPU was maxed out running the LabVIEW process. I added in a time delay in the while loop to allow the processor time for other operations and it worked great. The CPU was also not bogged down.
Is it possible that your while loop is just spinning out of control? Or do you believe the TCP communication provides enough latency to keep this from happening? I would recommend placing an indicator by your iteration counter to see if this is what is happening.
Anyway, let me know how it goes. I have attached some of the modified code for you.
-scraggs99