refactoring and vertexDistance test on wrapped vtk arrays