There are many things you can do, as the various answers point out. The correct answer depends on your actual problem. Brute force creation of such a large array is impossible without a 64 bit version of matlab plus enough memory to store that large an array, or storing the array in some other way. You can store the array offline, only bringing in what you need as you use it.
For example, if these numbers will always be small integers, then use uint8 or int8, or a logical array, even a single array, all of which will reduce the memory requirements compared to double arrays. Or use a sparse storage form as appropriate. Much depends on what you will do with the array.
As far as a variable number of elements in a row, use a cell array here, not a flat traditional array.