added iterators and update array class for using iterators.