Characterization of convex and generalized convex vector fields on Riemannian manifolds