polish
get generic type by index
support mapping custom type to map value