Does FreeBSD, NetBSD, or OpenBSD have an encryption feature like Linux's dm-crypt? And will it work for a system partition?
Indeed, this is documented in the handbook:
gbde is mentioned first,
geli is generally more recommended. The installer actually will even help you set this up, there's a prompt for it.
OpenBSD has softraid(4), which allows you to use an encrypting discipline on a block device. Setting up disk encryption is not supported by the installer (as of September 2020), but can be configured by hand during an operating system installation. OpenBSD FAQ has a section dedicated to Full Disk Encryption which can be used as a reference for setting up disk or partition encryption.
NetBSD can indeed be run with an encrypted root filesystem, via a kernel module called
cdgroot (though it still needs an unencrypted partition to boot from).
See the following for some comments on the concept and configuration: