method to get all data from array cache