Create an iterator for an object; hopefully, the created iterator will be optimal, depending on the type of the object.