Incomplete fix/workaround for broadcast static type inference (#4673)

This attempts to infer the dimensionality of the returned array,
although this only works for cases of sufficiently low
dimensionality.
Use promote_eltype in Broadcast
Merge pull request #4741 from simonster/broadcast-workaround

Incomplete fix/workaround for broadcast static type inference (#4673)