Hi,
For grouped attachments you can use the web parts mentioned
here at the bottom.
If you want to display the attachments in a transformation, you would need to make that web parts to be server controls and then use them in the transformation or, second option is to use the API and create e.g. a custom function for a transformation.
Best regards,
Juraj Ondrus