WRONG. Neither transporters NOR replicatos operate as you describe. They break down EXISTING matter, manipulate it, and reassemble it.
For the record:
Transporters convert matter into energy (which they can manipulate) and back again.
Replicators are capable of the same process, only it's primarily used when recycling and NOT when people decide to replicate a meal or an object.
Replicators need 2 thins: Energy, and the formula composition of an object a person wants to create ... because the replicators use a pre-existing formula to convert energy into matter by restructuring it as they want to (as previously explained, they can manipulate the energy to this extent) ... clearly established in Voyager and TNG.
Transporters merely work with pre-existing matter (humanoids or objects) which is why they were invented first and replicators second.
This is why replicators have been usually portrayed as types of systems that need a lot of power (which was initially a problem for Voyager, and later on they discovered a way to triple their efficiency and feed 500 people a day using 50% less power compared to what they they were using before ... episode 'Void' btw ... meaning that this would translate into a minute energy use as far as replicators are concerned when the ship exited the void and continued to provide food for measly 150 people).
In TOS ... they had food synthesizers ... those were restructuring for example recycled matter into basic components and restructuring them into a meal.
Oh ... and they had this technology from since the NX-01 (which was roughly 120 years before the TOS events took place).
Holodecks need energy to materialize forcefields and environments ... not pre-existing matter.
Have you been WATCHING the show?
Still doesn't explain WHERE the raw stocks of materials are stored.
Correct me if I'm wrong, but star-ships usually come equipped with relatively large cargo-bays, which are used to store supplies.
And again, their storage techniques and technology is much more efficient and advanced compared to what we can do today.
You can "perceive" it any way you want. The biological fact remains that a human needs x amount of air/day, x amount of water, and x amount of food. If you are depending on your Handwavium Device to produce it "just in time", you are a fool and when your Device breaks down you will either suffocate, freeze, or starve.
You must have smacked your head because in Trek, crews usually maintain their technology and equipment.
Also ... to answer the question of where all the power is coming from.
There is that big glowing object in every engineering section of a star-ship that spans several decks.
It's called the WARP CORE.
Main source of energy for ALL ship systems, although they usually use auxiliary impulse reactors (or maybe even fusion reactors) to power all systems in the absence of the core, or when the core is damaged, being upgraded of simply turned off.
Well documented in the show on screen btw ... doesn't get more canon that that.
Oh one more thing ...
We were able to transport an atom from one location to the other years ago.
It may not be the same feat as transporting people, but at least it proves it can be done at least with non living objects and we are making small steps.
Theories are being done into research of FTL travel, and the concept of food/objects syntezisers is becoming slowly a reality (there was an intel show-reel recently that portrayed on what they are able to do with restructure of matter on a nano scale for example ... and you have printers that are almost a decade old that can create a full 3d object that was constructed in programs such as 3d studio Max and Maya).
It may not be true replicator technology, but we are getting there.
To call Trek technology as 'magic' when some of it has been realized in real life in the 21st century is what I would call 'being in denial'.
But if you want to continue to drone about you perspective, you are perfectly willing to do so.
I'm not going to stop you.