Add element to local temporary array of integers

Im building a macro for my library. It uses a “for each loop” to build an array. I don’t know how to build the array using a local temporary array. If i use the add node it does add to the temporary array but only once. But a normal array will add an element for every “for each loop”.

How do i dynamically build a local temporary array?

The answer is exactly the same way. For some reason i thought you had to use the assign node with temporary variables. For temporary variables assign = set