Hello Berker,
We could select all the objects that have same materail and assign material properties at one time, like:
"NAME:PropServers",
"object1","object2","object3",...
Thus, we could use use a array here.
I also suggest you to use pyaedt, that is open source in Github. https://github.com/ansys/pyaedt/releases
or in https://aedt.docs.pyansys.com/version/stable/, that you could share or submit issues.
Thanks.
HDLI