REF: share hashtable_func_helper code (#46090)
REF: share hashtable_func_helper code (#46090)

* REF: hashtable_func_helper

* REF: de-duplicate using to_c_type pattern
pandas-dev/pandas,pandas-dev/pandas,datapythonista/pandas,pandas-dev/pandas,pandas-dev/pandas,datapythonista/pandas,datapythonista/pandas,datapythonista/pandas