[C-ext] fix numeric & boolean & float keys in array

I have updated the C extension with the changes made in pull request #878. All test cases pass.

I'm not a C guru so it may be wise if the experts on the matter could review the changes.