General operator ground-state expectation values in the Hohenberg-Kohn-Sham density-functional formalism