findInArray function implemented with tests