Read a file:
*
Read lines of a file into an array
readarray -t arr <file
Or with a loop:
arr=()
while IFS= read -r line; do
arr+=("$line")
done <file