code: protected static <T extends MPBase> ArrayList<T> fillArrayWithResponseData(Class clazz, MPApiResponse response) throws MPException {
          ArrayList<T> resourceArray = new ArrayList<T>();
          if (response.getJsonElementResponse() != null) {
              JsonArray jsonArray = MPCoreUtils.getArrayFromJsonElement(response.getJsonElementResponse());
              if (jsonArray != null) {
                  for (int i = 0; i < jsonArray.size(); i++) {
                      T resource = MPCoreUtils.getResourceFromJson(clazz, (JsonObject) jsonArray.get(i));
                      resource._lastKnownJson = MPCoreUtils.getJsonFromResource(resource);
                      resourceArray.add(resource);
                  }
              }
          }
          return resourceArray;
      }
docs: It fills an array with the resource objects from the api response
  
  @param clazz                 a MPBase extended class
  @param response              MPApiResponse obj.
  @param <T>
  @return
  @throws MPException