I don't know the exact syntax but if you know the number of iterations you should be able to create the array.
It appears that the syntax is similar to:
shared datetimevar arr aDate;
local numbervar iter; //set this to the number of iterations
local numbervar i;
Redim aDate[iter];
For i:=0 to iter Do
(
aDate := dateadd("m",i,{table.startDate};
);
this will create an array that has the dates...if you want to see the values, that might be problematic as the number of array values is indeterminate, so you can't create an indeterminate number of formulas. you might need to create a function or if there is an upper limit of the number you can use that.
Either way, the way to access the variable is
shared datetimevar arr aDate;
aDate; //where i is the index that you are looking for.
Again, arrays are not my forte, hopefully, I am close enough for you to fill in the blanks.
HTH