void array_set_index(struct array *a,
The only differance is that it adds some debug and safety measures. Usually you don't really need to use this function.