generally you create an array outside of your loop...
# suitescript
b
generally you create an array outside of your loop and add your search results to the array