Add flatten array solution