You can use a shift register. To add a shift register to a 'For' loop, right-click in the border of the loop and select "Add shift register". You can initialize by wiring a constant to the left shift register.
The attached vi use a "For" loop go through an array and count the number of zeros in the array. (Make sure you input some numbers first in the array
🙂 )
Hopefully, this can help you with your situation.
Best regards;
EJV
www.vartortech.com