Overriding of custom variable within custom function

Is it possible to store values directly to the created variable using function
like data.variable.customVar = “hello”; from within the function, instead of going from resolve and then storing to the variable.

If variable values can be updated directly from functions, it can be challenging for new individuals to make changes to the bot flow. They would have to check each function to determine where variable values are being inserted. To avoid such problems, our platform only allows variable values to be inserted or updated in the bot flows (Studio UI).