Loop through all entry types, separate each group type by line rule (hr)
You can use the group filter

{% set allEntries = craft.entries.section('pets').all() %}
{% set allEntriesByType = allEntries|group('type') %}
{% for type, pets in allEntriesByType %}

     All Pets of Type {{ type }}

     {% for pet in pets %}
         {% include '_partials/animalOrgChart' with {
             title: pet.title,
             subTitle: pet.jobTitle,
             img: pet.headshot|length ? pet.headshot[0],                      
             url: pet.url,
             portrait: true
         } %}        
    {% endfor %}

    &lt;hr class="line" /&gt; 
{% endfor %}