REF: use fused types for part of hashtables code
This implements fused-type functions for the hashtable code that currently uses tempita.  Same idea as #29244, but this breaks off a part that I can confirm is performance-neutral.