Create arrays with foreach2