One custom variable/value for multiple stages

Hello everyone!

Is there a more clean/efficient way to assign one custom variable/value to multiple stages without just copying and pasting the variable multiple times? An example of my use case is creating a variable to control the value of private on each one of my endpoints.

Example of the copy and paste method:

custom:
privateFunction:
local: false
dev: true
stage: true
production: true

I want to be able to do something like this:

custom:
privateFunction:
local: false
dev, stage, production: true

I haven’t been able to find the answer to this on the web so any help would be appreciated!