REF: separate out indexer/mask preprocessing code in algorithms.take_nd
Precursor for https://github.com/pandas-dev/pandas/pull/39692 (just moving code into a separate helper function)
FWIW im thinking a lot of `take` code could go into an array_algos.take thanks. yeah `array_alogs.take` sgtm.