Yes, Patchbox OS comes with our amidiauto utility bundled which automatically connects all MIDI software ports to hardware ports. /etc/amidiauto.conf can be used to customize the rules to make particular connections or to prevent automatic connections. There’s a couple of config examples available here in the community in some topics.
amidiauto only allows working with the very first port of a device or program. There’s a more fully featured utility amidiminder that you could use instead, and it allows connecting all the ports as necessary. You should also find more information on it here in the community.
I’d recommend using one of these automatic connection utilities to set up your system, and skip making ALSA MIDI connections within the patch.
If you’d like to have identical behavior on both devices, then you either would have to get amidiauto or amidiminder installed on your laptop too (only if it’s Linux), or disable those utilities on the Pi.
Just install the quark and look at the tutorials, you create an instance of a modality controller inside your patch and assign controls to it, all you need is a template of your controller that maps all the hardware controls to the naming convention of the library. I believe there already is a template for the controller you use: