mapArray and tests