Change your technique to get rid of the pipeline, change your shell to ksh, or live with the empty array. These are your options. Sorry, but you can't keep the pipeline, bash, and the array contents. One has to go. Here is a simple script to illustrate the problem...
Code:
$ cat script2
#! /usr/local/bin/bash
echo "cat
dog
mouse
rabbit
lion
wolf
dog
bat
lion
hamster
rabbit
elephant
elephant
whale
cricket" > list.txt
index=0
cat list.txt | while read item ; do
array1[index]=$item
((index=index+1))
done
echo array1: ${array1[@]}
exec < list.txt
index=0
while read item ; do
array2[index]=$item
((index=index+1))
done
echo array2: ${array2[@]}
exit 0
$ ./script2
array1:
array2: cat dog mouse rabbit lion wolf dog bat lion hamster rabbit elephant elephant whale cricket
$
ksh is the only shell I know that will populate both arrays. This is one of the reasons that I strongly prefer ksh to other shells. (The other is ksh co-processes.) So my suggestion: switch to ksh.