You can't. To create a static or even dynamic array you have to specify the size.
If you want to have a container that can hold an "unlimited" (which of course is not possible because you can always run out of memory ) number of elements, you can use a linked list or other such data structure.