Blue Apron Interview Question

Give me your implementation of flatten array.