simplify array handling

pass as argument to `Array()` constructor, rather than `[@a].flatten.compact`