Layered mixed matrices and reaction networks