It appears to me you need to create 'test' as an associative array so you can use text as indices:
Code:
declare -A test
test["x"]=blah
echo ${test["x"]}
I have to say, and this no indictment of the OP, but I am amused how many people want to join the output of one variable with other text to make a new variable.
There may be other languages that can do this but to date I have not come across one. Plus for the rest of your code you would need to call the original variable every time you wish
to refer to this new variable ... not sure I see the upside?? (just a thought)