Second for could be avoided by Parameter expansion
for nam in "${name[@]}";do printf "${nam/%/%s\\n}" "${array[@]}";done
will produce:
toto_a
toto_b
toto_c
tata_a
tata_b
tata_c
For fun, some variants (without any for loop):
printf -v fmt "${name[*]/%/%%s\\n}"
printf "${fmt// }" ${array[@]}
toto_a
tata_b
toto_c
tata_
or
printf -v fmt "${name[*]/%/%%s\\n}";printf "${fmt// }" ${array[@]}{,}
toto_a
tata_b
toto_c
tata_a
toto_b
tata_c
then without for, but with a fork to sort
printf -v fmt "${name[*]/%/%%s\\n}";printf "${fmt// }" ${array[@]}{,} |
sort -k 1r,1.5
toto_a
toto_b
toto_c
tata_a
tata_b
tata_c