The main idea is to prepare string with the list of files to operate (even through the loop) than transfer the string to command:
sloc='[email protected]:sloc='/some/location/'location'
flist=(unset $(flist
for i in "$@" ;
do
printf '%s ' "$sloc$iflist[${#flist[*]}]="$sloc/$i/$i".{pdf,txt}
; done ) )flist[${#flist[*]}]="$sloc/$i/$i".txt
done
scp [email protected]:"${flist[@]}" /somewhere/else/