Capturing devices

Hi, i was wondering if there is a way of capturing multiple devices in a variable and then speaking them later using an Echo for example. Rather than using several IF blocks is there a way to capture all devices at once in one variable and then speak them. I have been offered a solution which works with multiple If's which i use in different rules but i was wondering if i'm missing a trick. i hav eno idea about strings, could they be an option?

See screenshot which gives my idea but i cant see a way where i can save the 1,2,3,4 matching devices into the one variable. Is this possible?