SMS: SDSS-IV MaNGA: Global stellar population and gradients for about 2000 early-type and spiral galaxies on the mass-size plane