Added cast functions between array and array_v