PsiField[] (PsiField[] fields, int[] indices) { ArrayList<PsiField> result = new ArrayList<>(); for (int indice : indices) { result.add(fields[indice]); } return result.toArray(PsiField.EMPTY_ARRAY); }