The previous solution for meta boxes worked fine, until I realized that I needed another one for my newsletter custom post type too. The quick solution would have been to duplicate the code and just rename and edit the necessary sections, but most of the code would remain the same. This would cause problems if it has to be edited in the future.
The same website provides a tutorial for multiple meta boxes. The required fields and other details are first stored in a
$meta_boxes array, then a loop is used to go through all of them.
As explained on the tutorial, this doesn’t quite work because the callback display function can only handle one meta box at a time. The solution is to put all the functions in a class. The class constructor will initialize each meta box and hook the add and save functions onto the WordPress hooks. The website has the full explanation and sample code.