The first thing you should do is eliminate ALL local variables. You have at least one race condition and there could very well be more. Create a cluster to hold all of your data and use a shift register to pass it from state to state. In each state, unbundle by name or bundle by name as needed.
If you continue to have problems, you then need to provide details on 'it was not working as wanted'. That's pretty meaningless. You are the only one that knows what you want. You have to be able describe what you want and what's the difference with what you are getting.
By the way Dennis, I need your idea.
Let say, I have an array of :
Then, number 1 is the reference point. What will you do (in LabVIEW) to detect the reference point of number 1 at Index 3 and others.
I would much more appreciated if you could show me an example to do this (picture may be).