Viability and invariance of systems on metric spaces. (December 2022)