TST: add hypothesis-based tests
Addition of "hypothesis usage" in test cases of
tests/reshape/test_util.py as kind of POC.

- [x] closes #17978
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
