More idiomatic way to combine arrays