To expand array indirection, the string [@] must be part of the variable. It works for the values:
for thelist in "${master_list[@]}" ; do
reallist=$thelist[@]
for key in "${!reallist}" ; do
echo "the key is: $key"
done
done
For the keys, I don't see a way without eval.
for thelist in "${master_list[@]}" ; do
eval keys=('"${!'$thelist'[@]}"')
for key in "${keys[@]}" ; do
echo "the key is: $key"
done
done
As far as you're sure the master_list contains only variable names, it should be safe.