[Nexus 5X Q&A, Help & Troubleshooting] trissypissy:
In the past I've done this from the recovery shell. But TWRP 3.0.0.1 does not offer this option under advanced wipe ... From the adb shell while booted into Pure Nexus i see a make_f2fs binary ... but have never attempted to format partitions from the booted system ...

1|root@bullhead:/ # make_f2fs

F2FS-tools: mkfs.f2fs Ver: 1.4.0 (2014-10-18)

Error: Device not specified

Usage: mkfs.f2fs [options] device [sectors]
[options]:
-a heap-based allocation [default:1]
-d debug level [default:0]
-e [extension list] e.g. "mp3,gif,mov"
-l label
-o overprovision ratio [default:5]
-s # of segments per section [default:1]
-z # of sections per zone [default:1]
-t 0: nodiscard, 1: discard [default:1]
sectors: number of sectors. [default: determined by device size]

1|root@bullhead:/ # mount
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=919280k,nr_inodes=229820,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
none /dev/cpuset cgroup rw,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=919280k,nr_inodes=229820,mode=750,gid=1000 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,size=919280k,nr_inodes=229820,mode=755,gid=1000 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor /vendor ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,nodelalloc,errors=panic,data=ordered 0 0
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,size=919280k,nr_inodes=229820,mode=755,gid=1000 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0