Can Golioth OTA write to a different slot on MCUBoot?

In general it is possible, but you might need to use lower-level APIs in order to achieve that. In the Golioth Zephyr DFU sample we use Zephyr’s subsys/dfu/img_util in order to write downloaded image to flash. This subsystem assumes for now the simplest approach of 2 image slots and the slot is hardcoded in zephyr/subsys/dfu/img_util/flash_img.c:

    #define UPLOAD_FLASH_AREA_LABEL slot1_ns_partition
#if FIXED_PARTITION_EXISTS(slot1_partition)
    #define UPLOAD_FLASH_AREA_LABEL slot1_partition
    #define UPLOAD_FLASH_AREA_LABEL slot0_partition

/* FIXED_PARTITION_ID() values used below are auto-generated by DT */

In order to write into another partition, you need to either extend this subsystem in Zephyr or write your own utilities that will use partition of your choice.