move some variables to runtime, impl array::Map