Constraining mass spectra with sterile neutrinos from neutrinoless double beta decay, tritium beta decay and cosmology