Array of type switch

Not directly. The Rules DSL does not support arrays.

It does support HashMaps and ArrayLists which might be useful.

But in a case like this I would recommend using Groups, Design Pattern: Associated Items, and Design Pattern: Working with Groups in Rules.

For example, if your Items are represented by a number you can send a command to that Item using something like:

sendCommand("LightSwitch_"+number, "ON")

To get a reference to that Switch Item you can use:

val lightSwitch = MyLights.members.findFirst[s | s.name = "LightSwitch_"+number] as SwitchItem

tl;dr, use Groups as your arrays.