Echo var1,var2,var3,var4,var5,var6 in loop help

Hello,

I have created numerous variables called $mask1 $mask2... $maskN. I wish to echo these variables, below is the code for the two functions, the first creates the variables and the second echos them.

It is the second function which does not work. The line (i believe to be wrong) is in red.
Thanks!!

#!/bin/bash

## Make word mask
function makemask() {
while [ $count1 -le $length ]
do
eval mask${count1}="-"
count1=$(( $count1 + 1 ))
done
}

## Show word Mask
function showmask(){
while [ $count2 -le $length ]
do
echo $mask${count2} ## This only echos the count2 variable instead of the mask variable.
count2=$(( $count2 + 1 ))
done
}

I did quite a bit of digging, and got this:

eval echo \$mask${count2}

Try it. If it works, let me know.