Can I use JavaScript dynamic arrays in my games? And how would I store that?

Hi! My question is simple (Or maybe not): How much power I have by using JavaScript?

Can I set up dynamic arrays so I can insert and remove freely how many variables I want to? (For example, an array with an unknow number of NPCs(Other arrays), where every one has their own name, status and itens.)

If yes, how do I store variables created with JavaScript using the storage system?