initial support for array mapping

Adding support for array mapping.