Array ForEach, but queries get executed only once

You've entered a fairly challenging aspect of retool imo. I've battled with the recently.

Check out this post it may help

Also with js query see the advanced setting "Keep variable references inside the query in sync with your app" if using setIn or setValue