code: public Object getArrayElement(Object o, int index) throws IndexOutOfBoundsException {
          if (o instanceof List)
              return ((List)o).get(index);
          return Array.get(o,index);
      }
docs: Given an instance for which the type reported {@code isArray()==true}, obtains the element
  of the specified index.
  @see #isArray(Object)