In bash v4 you can use a "nameref"
$ foobar_darwin_amd64=pinto
$ package=foobar
$ declare -n var=${package}_darwin_amd64
$ echo $var"$var"
pinto
# and
The variable name you constructed can be obtained with the indirect variable expansion syntax:
$ .....
echo $"${!var}"
foobar_darwin_amd64