TST: #31922 assert no segmentation fault with numpy.array.__contains__
- [ ] closes #31922
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] new test cases
