i currently save datas in array to config on disable and load them on enable. is there any other method to saving arrays when server restarts or closes?
You can use the serialize() and unserialize() or json_encode() and json_decode() (EDIT: You can also use yaml_emit() or yaml_parse()) to save to file when plugin enables and load from file when it disables, This is kinda the same concept except it allowes you to store big objects. NOTE: NEVER serialize pocketmine's object, for more info, go to this thread: https://forums.pmmp.io/threads/why-not-to-serialize-objects-for-storage.5614/
PHP arrays aren't the best in terms of memory consumption. You are fine if the number of entries in the array is not much (a million entries should be okay) PROVIDED you are not looping through the array or sorting it frequently. I'd recommend you store your data into a database, such as MySQL and MongoDB. These databases are designed to hold millions of entries and process get/sets in just as much time as it would take with one entry in the database. P.S. Do not query server-based databases on the main thread.
Both — MongoDB and MySQL are server-based, you can connect to them from anywhere. This should be a good time for you to learn SQL. Also check out the libasynql virion which provides a simple async API for MySQL queries.