I think you should definitely make sure that your SQL starts on a clean plate - i.e. release and/or initialize the output array. If the array exists and has some values in it, a SQL returning nothing will not ‘update’ the existing array.
If or when you release the array explicitly, it depends on your design - mainly the scope of the array.
Doru