CLN: unify logic for form_blocks and make_blocks
In the background part of the intention here is to make things like #19174 easier.

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