Hi,
Don't worry with iterations and loop in this sort of features, it's fine. Be aware that even if a custom action was made, it would still need to iterate trhough that list anyway, so actually makes no difference, the slight overhead of doing it manually is totally insignificant compared to what could go wrong with shaders, visual effects, meshs in your scene that would affect frame rate and performances way more.
Bye,
Jean