Read the original names into an array:
readarray -t names <groupAfiles.txt
Replace the initial file prefix with /dev/loop:
names=( "${names[@]/#file//dev/loop}" )
The substitution used here will replace the string file at the start of each element of the names array, if that prefix string is present, with the string /dev/loop.
To display the resulting array with spaces between the elements (assuming the shell variables IFS has its default value):
printf '%s\n' "${names[*]}"
Testing:
$ cat groupAfiles.txt
file14
file2
file4
file9
$ readarray -t names <groupAfiles.txt
$ names=( "${names[@]/#file//dev/loop}" )
$ printf '%s\n' "${names[*]}"
/dev/loop14 /dev/loop2 /dev/loop4 /dev/loop9
/dev/loopfilenames into a space-separated string the final goal, or are you doing something else with them, like passing them as arguments to some command?