Is it important for you to control the array type?
If not it seems you could simply do
map(fn_to_call, list_of_inputs)
letting the standard library handle determining the type of array that should be allocated.
If you want more control it might still be possible but I’m guessing the solution then depends on what you’re trying to achieve.