[ArrayManager] Array version of putmask logic
xref #39146

Trying to remove the usage of `apply_with_block` for putmask. 
(I also need to this for the Copy-on-Write branch to be able to perform the copy on write in putmask)
can the fallback logic stay in internals?  maybe internals.methods?  there are a few funcs in internals.blocks that might go there too. > can the fallback logic stay in internals? maybe internals.methods?

Yes, either way is fine for me. Happy to move it into internals. > (I also need to this for the Copy-on-Write branch to be able to perform the copy on write in putmask)

Can you elaborate on this a bit?  If we're going to implement CoW for BM anyway, some of the duplication might be avoidable. >> (I also need to this for the Copy-on-Write branch to be able to perform the copy on write in putmask)
> Can you elaborate on this a bit?

See the 3 lines at https://github.com/pandas-dev/pandas/pull/41878/files#diff-b8c89656832340e9986eeee40df66eb4282555045a257e7a489d98b21b0adfbeR390-R393 that I currently added in that PR. Since putmask is used in indexing, I need to check for a copy-on-write (and this is not needed for `apply` in general).

> If we're going to implement CoW for BM anyway, some of the duplication might be avoidable.

I think that in general the CoW detection on BlockManager will be a separate implementation (but of course difficult to say before actually trying). For example the simplest way is to do this on a block-by-block basis (which would already give different code as the 3 lines I referenced). 
 This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. I increasingly think that this type of change should be left until right before BlockManager is ripped out. Until then, this just duplicates code and makes it easy for behavior to accidentally drift apart. can you merge main closing as stale