heads = [Head1, Head2, Head3]
dog = [{"breed":"Lab", location: (8,3)}, {"breed":"Lab", location: (5,2)}, {"breed":"Lab", location: (6,9)}, {"breed":"Lab", location: (1,4)}, {"breed":"Lab", location: (2,7)}];
<table>
    <th>
        <% heads.forEach(head => { %>
            <td><%= head %> </td>
        <% }) %>
        <td>Head1</td>
        <td>Head2</td>
        <td>Head3</td>
    </th>
    <% for( let i = 1; i <= 3; i++ ) { %>
        <% for( let j = 1; j < heads.length; j++ ) { %>
            <td><%=i%>,<%=j%></td>
        <% } %>
    <% } %>
    <tr>
        <td>1,1</td>
        <td>1,2</td>
        <td>1,3</td>
    </tr>
    <tr>
        <td>2,1</td>
        <td>2,2</td>
        <td>2,3</td>
    </tr>
    <tr>
        <td>3,1</td>
        <td>3,2</td>
        <td>3,3</td>
    </tr>
</table>