Fix, (see also [S. Chazelas' answer][1] for background), with sensible output:

    #!/bin/bash
    IN="One-XX-X-17.0.0"
    IFS='-' read -r -a ADDR <<< "$IN"
    for i in "${ADDR[@]}"; do
        if [ "$i" = "${i//.}" ] ; then 
            echo "Element:$i" 
            continue
        fi
        # split 17.0.0 into NUM
        IFS='.' read -a array <<< "$i"
        for element in "${array[@]}" ; do
            echo "Num:$element"
        done
    done

Output:

    Element:One
    Element:XX
    Element:X
    Num:17
    Num:0
    Num:0

---

Notes:

* It's better to put the 2nd loop within the first loop, since it should only occur if an element contains numbers.

* To check if there's `.` in an element, `bash` pattern substitution (`"${i//.}"`) is used.  A `case` statement might be simpler, albeit less similar to the *OP*'s code.

* `read`ing `$array` by inputting `<<< "${ADDR[3]}"` is less general than `<<< "$i"`.  This way there's no need to know *which* element has the `.`s.  Less code too.


  [1]: https://unix.stackexchange.com/a/397208/165517