The two easiest ways to clear an array are a loop with an assignment and the memset function
#include <string.h>
void * memset ( void * dest,
int val,
size_t len
)
Fill memory with a constant byte.
The memset() function fills the first len bytes of the memory area pointed to by dest with the constant byte val.
Returns:
The memset() function returns a pointer to the memory area dest.
There are a couple of things I would try.
Increase the size of your storage array by a couple of bytes without changing anything else. If this solves or changes the symptoms than it is an excellent indicator that you have a memory overrun in your code.
Clear the contents of the array prior to reading a new tag
It might be worthwhile to pair down the functionality of your code to just the component that is having the problem--tag reading. To try and diagnose the problem within a simpler framework.
It looks like you might be able to send message through the serial port to a display device (computer). I would suggest sending prints of the associated variables before and after sections (one at a time) to verify that the code is doing what you expect. For the array it might be helpful to print the entire array in hex rather than as a string.
If your serial port is tied up, I would use the software serial library to send the debug output.