Implement getSinks and getWells using iterators