ENH: allow where to be a list/array or a boolean mask of locations (GH4467)

closes #4467