better use "read -r -d '' -a" to read in the array. It handles multiple lines and missing newline at the EOF.