I normally use a temporary array in my UDFs and do the return value assignment at the very end of the function.
_________________________
There are two types of vessels, submarines and targets.