Not sure if I follow.
You run a loop, create widgets, pipe in the data, bind their dispatchers and add them to a container.
The container already acts as an array, but you may want to have it all in an array as well, ofc.
If you’re having issues with misbehaving logic/ script, show us the script.