Add Array.flatMap method