update algo.take to solve #59177
- [x] closes #59177
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

need to work on 

FAILED pandas/tests/dtypes/test_generic.py::TestABCClasses::test_abc_hierarchy[ABCNumpyExtensionArray-inst6-ABCExtensionArray-subs2] There are a few others `if isinstance(xxx, (ABCIndex, ABCSeries, ExtensionArray))` like tests in pandas code (algorithms.py, common.py, categorial.py, blocks.py) and I wonder if I should find them all and append `ABCNumpyExtensionArray` ? Thanks @mutricyl 