If the array was empty, the error would have been "invalid index", not "invalid handle". The only way this error can show if is either ArrayCreate() wasn't called or ArrayDestroy() was used. Check your entire plugin_precache() function, something may be preventing the code from reaching ArrayCreate() - check your error logs for other errors in the plugin, especially when starting the server.