This shows how to correctly use the arrays from VecGetArray().