array_del improvement

I want to store this commit somewhere, why not in your repo ;)
It has been tested and it is convenient.