If you really need an array, you will have to know how many elements you want in the array when you allocate storage for it. You can do this at runtime - you don't need to know it at compile time, but you must do this before you can use the array.
Somewhere in the ads section:
String[] dataArray = null;
and then somewhere in the code
dataArray = new String[numberOfElements];
( ) . numberOfElements.