If you connect your wire (with data) to the right edge of the while you will see a blue box.
Right clicking on this box can turn it into an more open box (enable indexing)
to the right of the loop you can use a rightclick and create an indicator.
That will be an array now.
in the while loop in the picture, you see both versions above each other
above no index enable keeps the last value from the while
below index enbled keeps all values from loop 0 until i in the array.
greetings from the Netherlands