lib/c: fix type of index in `NativeCArray::[]`