“I can change the value of a constant through a cloud foundry instruction.“ Do you mean during uptime? That is not expected to be possible.
Constants get initiated during startup and their value stays the same. See more on this here: https://docs.mendix.com/refguide/constants.
This is not possible. Depending on your use case maybe you need an alternative to constants such as a singleton object.
https://stackoverflow.com/questions/55794490/how-to-declare-a-global-variable-in-mendix