Replace Array#forEach with Array#map