Remove all items from an array
The easiest way is not to create a new (dynamic) array every time you need one, but create one array (like you probably have). However, an array always has a fixed length, which is defined during declaration. An easy way to denote that e.g. only the first 10 items are filled, is to create an integer variable, that has value 10, which means that from the array (e.g. int myArray[20] only the first 10 values are saved. Whenever you add a new value in the array, use 

myArray[filledSize++] = newValue;


This will add the new value at array element [filledSize] and increase the filledSize. You can add protection that filledSize should never be more than the size of the array.

To clear an array you simply use

filledSize = 0;


And whenever you iterate through the array you use

for (int elem = 0; elem &lt; filledSize; elem++)
   {
       myArray[elem] ...

However, in many cases you want a ring buffer, I will not elaborate on it, but maybe you can check into this, to see if this is more appropriate in your case.