Accessing values read from an SD card in setup() and loop()

Yes, I have heard of global variables. But I though the only way to make them was to initialize the variable outside of setup() and loop(), at the start. But my problem is that I do not know the size of myMatrix to begin with; that variable's size is only found in my ReadCardInfo function. So how am I supposed to initialize myMatrix as a global variable if I don't know its size?

Or is there a different way of defining global variables?