Fix directories template fragment

- Removes camel-case stuff
- Adds tests for arrays of elements
- Bugfix template for arrays of elements
- Adds tests for all elements