add an API for allocToFields in Env