`Base`: delete unnecessary `hastypemax` methods (#58003)
The hardcoded methods are covered by the fallback method correctly. The
reason these methods existed is probably that the fallback was not
foldable at some point. Now it is foldable, so delete the unnecessary
methods.
Also add tests.