Fix array_remove. array_remove no longer use malloc.