reading data from a file to an array

I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array?

while read line; do
    read -A array <<<$line
    n=${#array[@]}
    for ((i=1;i<$n;i++)); do
       print "${array[$i]}"
    done
    func=${array[0]}
    data1=${array[1]}
    data2=${array[2]}
    eval $func \$data1 \$data2 
done < $list

thanks

Here is some array using example.
=> for you is enough:

whle read line
do
     array=($line)
     ...
done

Array examples:

#!/some/shell     (=ksh, bash, ...)
#arrays
mytable=(a1 b2 c3)
echo ${#mytable
[*]}
echo ${mytable
[*]}

# save cmdline args
myargs=("$@")
echo "0:${myargs[0]}"
echo "1:${myargs[1]}"

# from file
cat <<EOF > $0.tmp
123 456 444
222 444 555
EOF

values=( $(<$0.tmp) )
echo "file in"
echo "0:${values[0]}"
echo "1:${values[1]}"
# from file, delimiter ;
cat <<EOF > $0.tmp
123;456;444
222;444;555
EOF

echo "csv"
oifs="$IFS"
IFS=";"
values=( $(<$0.tmp) )
IFS="$oifs"
echo "0:${values[0]}"
echo "1:${values[1]}"

# cmd output
echo "time"
values=( $(date '+%H %M %S') )
echo "0h:${values[0]}"
echo "1m:${values[1]}"
echo "2s:${values[2]}"