This is probably a stupid question but why use arrays when you can use database?
Because they're two completely seperate things. Arrays are simply "lists" of variables. A database is a system that will store data permanently, while an array is just a variable you can work with while the script itself is running.