Blue Apron interview question

Give me your implementation of flatten array.