Fix type of allocated array when broadcasting type unstable function (#37028)
We need to call similar on the `Broadcasted` object rather than on dest array.
Otherwise the `BroadcastStyle` isn't taken into account when allocating new
array due to function returning elements of different types.