I ran into a similar need when passing an array to a method that
expected an array of objects all implementing the same interface.
into-array didn't work because the objects did not share the same
concrete type. But to-array didn't work either, because the type of
the resulting array was wrong. I did this:
(defn to-array-of [class coll]
(let [array (make-array class (count coll))]
(dorun (map (fn [item index] (aset array index item))
coll
(iterate inc 0)))
array))
-Stuart Sierra