purge array of documents