Structure function tensor equations in inhomogeneous turbulence