Setup mapArray variables and functions