How can I loop through an array of data in the email template?

How can I loop through an array of data in the email template?

I want to make a purchase notification template but I don't know how I could loop through an array type variable that will contain the list of products that the customer bought with their specific information (quantity, unit price, etc) to make a pretty nice table... there are no guides in the documentation to loop through an array.

Does anyone know how?