Replace array.map() by array.forEach()

As told by @q-- in #376 replace array.map() by array.forEach() because
it's faster and the array returned by map() is not used