Support direct indexing of rectangle and bounding box classes to obtain coordinates