code: public List<String> getValuesForFieldInPolicy(String sec, String ptype, int fieldIndex) {
          List<String> values = new ArrayList<>();
  
          for (List<String> rule : model.get(sec).get(ptype).policy) {
              values.add(rule.get(fieldIndex));
          }
  
          Util.arrayRemoveDuplicates(values);
  
          return values;
      }
docs: getValuesForFieldInPolicy gets all values for a field for all rules in a policy, duplicated values are removed.
  
  @param sec the section, "p" or "g".
  @param ptype the policy type, "p", "p2", .. or "g", "g2", ..
  @param fieldIndex the policy rule's index.
  @return the field values specified by fieldIndex.