_get(Vec) and _get(Mat) currently allocate the output array, but the user aware of what the array size needs to be, should change the output semantics so the memory allocation happens in user-space. Both for simplicity in terms of memory ownership and so the same array can be used to retrieve values multiple times since that is much more efficient.