Tensor generators on schemes and stacks