Calculate a variable in an array

Because you executed a return statement that causes an exit from the loop() function.