Make toMatrix an array method.