Earlier quoted context omitted.
There is no check that array[i] actually exists. If array[] has 2 items but args[] has 5, you will overflow the array.
D'oh!!! You're right! I was mentally substituting args[i] for array[i] Talk about code blindness. What a colossal blunder.
But I don't think errors are the biggest issue. The biggest issue is that this kind of stuff should be getting out of our way so we can focus on other things.