Stack the planes of multiple PAM images into one PAM image. More information: https://netpbm.sourceforge.net/doc/pamstack.html.
pamstack path/to/image1.pam path/to/image2.pam ... > path/to/output.pam
pamstack -tupletype tuple_type path/to/image1.pam path/to/image2.pam ... > path/to/output.pam