The idea maybe is to replace dots with spaces so you end up with a numbers list separated with spaces.
With original IFS, you can assign this value into an array easily (autosplit with spaces)
From that you can count elements in $ip_arr, iterate values etc...
Oh sorry, I read too quickly. I overlooked you want to overwrite the arguments list...
I never did that, not my programming style but why not
Correct syntax would be