The bad way: Using a shift register and a build array function node append them to the array.
The good way: wiring the value to the loop boundary and enabling autoindexing. Autoindexing is enabled by default on a For Loop, but needs to be enabled on a While Loop.
Rolf K
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390