Template function to convert ConfigOption value into yaml

If I have several ConfigOption values, and I combine them into a hidden ConfigOption, is there an easy way to convert the combined value into yaml. A bit like the sprig toJson function but in this case it would have to be toYaml.
ConfigOption 1 with value abc
ConfigOption 2 with value def
ConfigOption 3 with value ghi

Combined ConfigOption would have something like: [abc,def,ghi] and the result of toYaml would result in

- abc
- def
- ghi

Does something like toYaml exist for this?