How do you output an unknown number of images in a custom post type with desired markup?

Since you are using ACF, you should use a repeater field. This will give you a nice admin interface for adding/editing/removing images. Once you have the fields created and added to a page you just loop through the data with PHP, here is where you would create the markup needed for owl carousel.

Here is an example of getting the data from a repeater.

<?php if( have_rows('repeater_field_name') ): ?>
    <ul class="slides">
        <?php while( have_rows('repeater_field_name') ): the_row(); 
            $image = get_sub_field('image');
            $content = get_sub_field('content');
            $link = get_sub_field('link');
            ?>

            <li class="slide">
                <?php if( $link ): ?>
                    <a href="https://wordpress.stackexchange.com/questions/346938/<?php echo $link; ?>">
                <?php endif; ?>
                    <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" />
                <?php if( $link ): ?>
                    </a>
                <?php endif; ?>
                <?php echo $content; ?>
            </li>
        <?php endwhile; ?>
    </ul>
<?php endif; ?>

Read over the page I linked to above, it has more info and examples.