Endomorphism rings and a generalization of torsion-freeness and purity