[Android Software/Hacking General [Developers Only]] osm0sis:
Adding Magisk Manager, BINDSBIN SuperSU and Pixel /system/system support to my zips took a few additions to my usual setup.

For one, the updater-script is required to have the first 7 characters be #MAGISK or Manager will reject it:

#MAGISK# Dummy file; update-binary is a shell script.

Then in update-binary there's magisk_merge.img creation and the BOOTMODE output redirection to contend with:

test -e /data/adb/magisk && adb=adb;
ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false;
$BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true;
if $BOOTMODE; then
OUTFD=/proc/self/fd/0;
dev=/dev;
devtmp=/dev/tmp;
if [ ! -f /data/$adb/magisk_merge.img ]; then
(/system/bin/make_ext4fs -b 4096 -l 64M /data/$adb/magisk_merge.img || /system/bin/mke2fs -b 4096 -t ext4 /data/$adb/magisk_merge.img 64M) >/dev/null;
fi;
fi;

ui_print() { $BOOTMODE && echo "$1" || echo -e "ui_print $1\nui_print" >> $OUTFD; }

After that it's all pretty similar except you need to have magisk.img, magisk_merge.img and, for BINDSBIN SuperSU, supersu_is_here added for detection, specify a module name for Magisk (must match what's in the also-required module.prop), and then some generalization is possible using variables:

modname=module-name;

# Magisk clean flash support
if [ -e /data/$adb/magisk -a ! -e /data/$adb/magisk.img ]; then
/system/bin/make_ext4fs -b 4096 -l 64M /data/$adb/magisk.img || /system/bin/mke2fs -b 4096 -t ext4 /data/$adb/magisk.img 64M;
fi;

suimg=$(ls /data/$adb/magisk_merge.img || ls /data/su.img || ls /cache/su.img || ls /data/$adb/magisk.img || ls /cache/magisk.img) 2>/dev/null;
mnt=$devtmp/$(basename $suimg .img);
if [ "$suimg" ]; then
umount $mnt;
test ! -e $mnt && mkdir -p $mnt;
mount -t ext4 -o rw,noatime $suimg $mnt;
for i in 0 1 2 3 4 5 6 7; do
test "$(mount | grep " $mnt ")" && break;
loop=/dev/block/loop$i;
if [ ! -f "$loop" -o ! -b "$loop" ]; then
mknod $loop b 7 $i;
fi;
losetup $loop $suimg && mount -t ext4 -o loop,noatime $loop $mnt;
done;
case $mnt in
*/magisk*) magisk=/$modname/system;;
esac;
test -d $mnt$magisk/xbin -o "$magisk" && target=$mnt$magisk/xbin || target=$mnt/bin;
else
# SuperSU BINDSBIN support
mnt=$(dirname `find /data -name supersu_is_here | head -n1`);
if [ -e "$mnt" ]; then
target=$mnt/xbin;
else
mount -o rw,remount /system;
mount /system;
test -f /system/system/build.prop && root=/system;
target=$root/system/xbin;
fi;
fi;

Extraction has to take place in /dev when booted for Magisk Manager so we generalize there as well:

mkdir -p $dev/tmp/$modname;
cd $dev/tmp/$modname;
unzip -o "$ZIPFILE";

And a bit more final setup for the Magisk module:

if [ "$magisk" ]; then
cp -f module.prop "$mnt/$modname/";
touch "$mnt/$modname/auto_mount";
chcon -hR 'u:object_r:system_file:s0' "$mnt/$modname";
if $BOOTMODE && [ "$suimg" == "/data/$adb/magisk_merge.img" ]; then
mkdir -p "/magisk/$modname";
touch "/magisk/$modname/update";
cp -f module.prop "/magisk/$modname/";
fi;
fi;

Cleanup is nice too:

umount $mnt;
test "$loop" && losetup -d $loop;

cd /;
rm -rf /tmp/$modname /dev/tmp;

Naturally if you use File-Based Encryption your recovery will need to be able to support FBE to have detection of paths like /data/adb/su/supersu_is_here work, but for recoveries that don't (*cough* Nexus 5X) SuperSU does handily include a merge mode for anything under /data/supersu_install but since there's no way to detect whether a SuperSU installation is otherwise present without digging into the boot.img I didn't bother trying to leverage this feature to directly work around broken FBE in recovery.

The best way to work around it in those situations is to flash SuperSU first; it'll create /data/supersu_install/supersu_is_here and then all the above script will work. FlashFire also works as an alternative to recovery altogether.