Add user-facing toArray method to Vectors

So that we can return them as arrays to an outer Scala environment
(e.g. when using a generated stub function).