Dynamically load CC list in Email alerts

How to write a custom script to load email list for CC, Currently, I have to write all emails manually in CC list for the email alert. How can I add them Dynamically? Is ERPNExt Support any kind of functionality to solve this problem.

Kind Regards.