If I've understood the numbers.seqence(from, to, step) method correctly, then it will create a list of numbers from 0 to the size of your list, with a gap of 3 between each number, so if you had an array of 10 items, you'd get [0, 3, 6, 9]. That's also what the th:if in the <table> is for: because if your array were empty, you'd get , which would cause the loop to iterate, and I'm guessing you don't want that to happen on an empty array?
The next part is to create 3 <td> sections, then just fill them with the values from your array. I think only the second and third <td>'s need null checks and that inner div, which just gets removed, so you end up with empty <td>'s to fill out the table row.
You can probably do the same with a list by changing .lenth to .size() and [index] to .get(index)