Fixed array_destroy_free() and added a test for this function.