In my private project (Key Box), I stored a JSON configuration in an Environment Variable. The configuration is displayed in a custom page and can be edited there. Here is how to update an EnvironmentVariableValue in Power Fx.
To update a Dataverse record, you need a reference to it. In my case, I already retrieved it as record in the step before, stored as global variable “envVarValRec” and I just reuse it now.
Update EnvironmentVariableValue in Power Fx
Patch( 'Environment Variable Values'; // the table name envVarValRec; // the record to update Defaults('Environment Variable Values'); { Value: "payload" // the string to store } )