Rationale: reduce use of gArgs to decouple code and simplify future maintenance and easier unit testing.
This PR is continuation of work started in  #18926 and #18662
It covers only places that register args in ArgsManager with AddArgs() or AddHiddenArgs().
Closes #19511