As you already found out, using space-delimited words is the only way to simulate arrays. So you must format the output again as a string in which the single entries are separated by spaces:
out = ''
do for [i in "1 2 3"] {
out = out . sprintf('%d ', 2*i)
}
print sprintf('%d entries: %s', words(out), out)
This prints
3 entries: 2 4 6
If using floats, you must use e.g. '%f' to format the output:
out = ''
do for [i in "1.1 2.2 3.3"] {
out = out . sprintf('%f ', 2*i)
}
print sprintf('%d entries: %s', words(out), out)
words counts the words in a string, and you can use word to extract a certain word from the string (starting from 1):
print word(out, 2)
4