What you call "EOF" can be googled as Here Document. Here Document can only be used to feed the standard input of a command.
The below example does what you want without spawning child processes
#!/bin/bash
multilineconcat=
while read line; do
#echo $line
multilineconcat+=$line
multilineconcat+=":"
done << EOF
path1
path2
EOF
echo $multilineconcat