maybe_upcast_putmask: require other to be a scalar
ATM all places where we use `maybe_upcast_putmask` have `other` as a scalar.  By making that into a requirement for the function, we can rule out the possibility of passing non-scalar other into `maybe_promote` (xref #29331).

Note: there are some simplifications within maybe_upcast_putmask that this makes possible that I did not implement in this PR.

cc @jreback @h-vetinari