Arrays initial wrapper + flatten function