Optimized and cleaner access to identifier and attributes

| Q                   | A
| ------------------- | ---
| Bug fix?            | Perf fix
| New feature?        | No
| BC breaks?          | No
| Tests pass?         | Yes
| Scenarios pass?     | Yes
| Checkstyle issues?  | No
| Changelog updated?  | No
| Fixed tickets       | N.A.
| Doc PR              |
Yes, and but the biggest gain comes from:
 - not using getValues that generate a array with key we do not use
 - not using toArray to iterate whereas we can iterate directly with a foreach