why not just do on the start of layout after setting the array
0plus2 = Array.At(0) + Array.At(1) + Array.At(2)
If you want to go through the array with for each, you should do it in the start of layout or any other triggered event, so it won't get called endlessly.
I usually do this instead of for each
then you can can check loopindex value to instead of using another var.
btw, your array was set to 5 width, so the last values did not get registered, you need to expand it to 8.