Q:

How to prevent while loop outputs from colliding with previous outputs?

After the first pass through the while loop, the output of the second pass appends to the last line of the first pass.
Here, I'm using a while loop with bash, I suspect that it's a \n problem.
There are two files, here's a bit of each:
input1
CGTGGGAA
TGTGGGAA
CGTGAGAA

namePBM
AAAAAACAACAGGAGGGCATCATGGAGCTGTCCAGCCTGT    220.632711
AAAAAACAGCCGGATCACAATTTTGCCGAGAGCGACCTGT    221.514925
AAAAAACGTCCGGTACACCCCGTTCGGCGGCCCAGCCTGT    222.473157
AAAAAACTCTAGACCTTTAGCCCATCGTTGGCCAACCTGT    262.183554

Here is the relevant snippet of code:
while IFS= read -r line
do
    OutputA1+=$(grep -o -P "$line" "$namePBM") #Shows Target Site
    OutputA2+=$(grep -o -P ".{0,2}$line" "$namePBM" | sed 's/........$//') #5' Flank
    OutputA3+=$(awk -v pat="$line" '$1~pat {print $2}' "$namePBM") #Intensity Values 
done < "$input1"

OutputA4=$(paste <(echo "$OutputA1") <(echo "$OutputA2") <(echo "$OutputA3"))

echo "$OutputA4"

The output looks like this:
CGTGGGAA        AT      500.306264
CGTGGGAA        GA      216.029774
CGTGGGAA        GT      226.937170
CGTGGGAA        CA      283.247237
CGTGGGAA        CC      383.089073
CGTGGGAA        TA      243.455285
CGTGGGAA        C       631.194970
CGTGGGAA        CT      318.330615
CGTGGGAA        AC      211.895150
CGTGGGAA                840.522056
CGTGGGAA        AG      194.045824
CGTGGGAA        AA      193.686006
CGTGGGAA        TC      282.153144
CGTGGGAA        GC      207.303981
CGTGGGAA        CG      225.282407
CGTGGGAA        TG      220.369882
CGTGGGAATGTGGGAA        TTTC    298.320734329.953276
TGTGGGAA        AG      203.847257
TGTGGGAA        GA      242.392699
TGTGGGAA        GT      211.894931
TGTGGGAA        AA      199.040909
TGTGGGAA        TT      228.433316
TGTGGGAA        TG      236.023833
TGTGGGAA        AT      320.913155
TGTGGGAA        CG      252.373388
TGTGGGAA        GC      257.858672
TGTGGGAA        TA      224.919676
TGTGGGAA        GG      176.379573
TGTGGGAA        CA      211.450761
TGTGGGAA        AC      315.362784
TGTGGGAA                666.500440
TGTGGGAACGTGAGAA        CCAG    187.171859233.376637

The expected output should be TGTGGGAA and its associated data forms on the next line.

A:

OK easy answer right now is that you need to emit a newline at the end of each iteration of the loop.
By default I think the $() command capture discards the last newline, and that is what then causes the lines to overlap.
Adding && echo '' may be good enough:
while IFS= read -r line
do
  OutputA1+=$(grep -o -P "$line" "$namePBM" && echo '') #Shows Target Site
  OutputA2+=$(grep -o -P ".{0,2}$line" "$namePBM" | sed 's/........$//' && echo '') #5' Flank
  OutputA3+=$(awk -v pat="$line" '$1~pat {print $2}' "$namePBM" && echo '') #Intensity Values 
done < "$input1"

OutputA4=$(paste <(echo "$OutputA1") <(echo "$OutputA2") <(echo "$OutputA3"))

echo "$OutputA4"

In fact, no, $() discards all trailing lines (says @Gordon), so we are left with
while IFS= read -r line
do
  OutputA1+=$(grep -o -P "$line" "$namePBM") #Shows Target Site
  OutputA1+=$'\n'
  OutputA2+=$(grep -o -P ".{0,2}$line" "$namePBM" | sed 's/........$//') #5' Flank
  OutputA2+=$'\n'
  OutputA3+=$(awk -v pat="$line" '$1~pat {print $2}' "$namePBM") #Intensity Values 
done < "$input1"
  OutputA3+=$'\n'

OutputA4=$(paste <(echo "$OutputA1") <(echo "$OutputA2") <(echo "$OutputA3"))

echo "$OutputA4"

For debugging purposes it may be useful to also print the line number in namePBM where the match was found using the grep -n argument.
To do this in a single sed is backtick hell:
while IFS= read -r line
do
  sed -n 's/^\(\([^ ]\{0,2\}\)\|[^ ]*\([^ ]\{2,2\}\)\)\('"$line"'\)[^ ]*[ ]*\( [^ ]*\).*$/\4 \2\3 \5/p' $namePBM
done

That is:

-n don't print non-matching lines
's substitute with everything escaped
/ capture pattern:
(\([^ ]\{0,2\}\)\|[^ ]*\([^ ]\{2,2\}\)\)   up to 2 characters in the first word, or any characters plus the 2 we want 
\('"$line"'\)   Unescape and capture the phrase we want
[^ ]*   discard the rest of that word
[ ]*    discard any extra spaces until the next word
( [^ ]*) capture the space before and the second word completely
.*$      discard until the end of the line
/\4 \2\3 \5  replace with: the test phrase, up to 2 characters or exactly 2 characters before, the second word
/p'  print it (because of -n)

Oh, and you can use \S instead of [^ ] and \s instead of [ ]!
Another way would be to build up all the words we want into one variable and then sed just once, but this would unduplicate any lines that contain 2 or more of the patterns:
Building the string I leave as an exercise, but to show it works:
lines="CGTGGGAA""\|""TGTGGGAA""\|""CGTGAGAA"
sed -n 's/^\(\([^ ]\{0,2\}\)\|[^ ]*\([^ ]\{2,2\}\)\)\('"$lines"'\)[^ ]*[ ]*\( [^ ]*\).*$/\4 \2\3 \5/p' $namePBM

