Trying to output part of bash array
ARRAY=(1,2,3,4,5)
for((i=0;i<3;i++))do
echo "${ARRAY[$i]}"
done
but in first loop echo output full array, and in the following loops output empty lines. How i can output array by elements in !this for cycle
1,2,3,4,5, not 5 separate elements.