Q:

call different variables with the same prefix changing only suffix

I have 20 variables (it may be 20 different mutableList items, or it may be a 20 buttons or any other objects), for example: 
var ex1 
var ex2 
var ex3 
...
var ex20 

And i need to make a for loop, which will look like this:
for (i in 0 until 20) {
//here i want to do something with variable that i have declared earlier
i+1
}

so, how can i go throught all the variables?  

A:

Create an array var[] ex and insert all the twenty var elements to that array. Iterate the array inside the for loop to access the 20 var elements

