Multiboot external drive for installing OS

Tools you need

You will need both OSX and Windows in order create the drive and expand/shrink the partitions

First create two partitions for the drive.

For example half of the space for YUMI for Linux and Windows installers, and the rest of the drive for OSX installers.

Using the Yumi usb creator you can format the drive and add or remove images.

MacOS images

For MacOS installers you need to be running OSX and use the installinstallmacos.py from the macadmin-scripts to download the images.

you need to be using the same architecture as you want the installer to work with. You can't create x86 installer with ARM

Use the installer script to download dmg image of the installer.

Use diskutility to format the remaining space of the harddrive as a HFS+

DiskUtility won't be able to resize the partitions because the drive is using MBR instead of GUID

Creating bootable OSX installation

To get a bootable installer, mount the dmg you downloaded and navigate inside the Installer.app in Content/Resources

There's a script that allows to install the image to a drive as a bootable version.

there can be some variation of the name depending which version of OSX you are installing but it's usually something like createinstallmedia --volume /Volumes/MyVolume

Here's more details of the process
https://support.apple.com/en-us/HT201372

Resize partition

when you have installed the OSX it is using all of the partition, you can resize the HFS+ partition in windows using diskgenious or use GParted (you can add it to YUMI and boot to it) when you have shrinked the volume, you can repeat the process adding as many MacOS installers as you want.