In Tile based games, where do you store the level arrays?

Hey guys!

So I’m about to make a level editor. All my levels are in array format as such:

var map1 =
[[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],]

But they are all within my Game class. Which takes up A LOT of code lines. So I was wondering, where are game maps usually stored? I’ve heard some use XML, but I’ve also heard that XML might take up more space than necessary.

Is there any other way? Where do people usually have stack these arrays?