If input is a String or Arguments object, use a for loop and include the integer keys.