How is the output type determined in map and friends?

BTW, with union splitting, I wonder if this is still needed. map & friends could just return Any[] for empty collections.