[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)