How to use array loop?

FYI: further discussion moved to iobroker forum :slight_smile: