In looking over the functionality of shipboard replicators on Memory Alpha and other sites, it appears that the devices function more like a transporter than a fabricator, basically transporting matter from a storage location to a food slot, rearranging the atomic structure of the matter en route to create an approximation of whatever the user has ordered. From what I can see, the raw matter is drawn from multiple sources, and is held in matter storage tanks aboard ship until needed. Those tanks are connected to the waste extraction system.
Does this mean that the tea which Picard is sipping today may have been the aftermath of Riker's five-alarm chilli-cheese burrito with Cardassian hot sauce yesterday?
Does this mean that the tea which Picard is sipping today may have been the aftermath of Riker's five-alarm chilli-cheese burrito with Cardassian hot sauce yesterday?