Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Sorry for the slopiness in the question. What I mean is that the functions $f_i$ could be different for each open subset $U\subset M$, and for each $p\in U$, $\{\partial f_1(p),\ldots,\partial f_m(p)$ must be a basis of $T^*_p M$.
Actually, I'm interested in a fixed endomorphism $N$, because it is the anchor of a certain Lie algebroid. Rather, a less demanding question would be if there exists a symmetric connection such that $(\nabla_X N)(Y)=(\nabla_Y N)X$ (which is enough for my purposes), but I'm afraid that some integrability conditions will be also required in this case, so I'll try another approach. Anyway, the discussion has been very interesting and helpful!