in reply to Array manipulation
Show us the code you have tried. grep would seem to be the best answer, but there may be stuff going on that is not obvious from your description.