lookup table of PIndexImplType rather than if-else-if logic