Append to a vector argument instead of returning an owned vector.

Also, use stack-allocated vector for fixed-length vector instead of allocating
on the heap.