readarray -t arr <file
Or with a loop:
arr=() while IFS= read -r line; do arr+=("$line") done <file