Rather than passing in a function to declare an array, any reason not to just pass in an array/Uint8Array result object?