codegen: add a couple of helpers for lookupf, lookupt