I am looking for the cheapest way to have a tri-folding bed come out of an armoire.
You could probably receive more helpful suggestions if you posted pictures of the Armoire and the tri-fold bed.
There are so many styles of tri-fold beds but you must be thinking about a folding foam - maybe the 3 fold cushion style?
You are wanting this attached to a frame that will unfold from the Armoire and rest on the floor?
I can only think of one way to do this and that would be to make your frame out of wood slats (like a futon) only crossed in the opposite way in three sections to unfold from your Armoire. You would have to make the legs the correct length to rest on the Armoire door frame and floor. Probably could attach the frame to the inside of the Armoire with a hinge same as attaching the 3 folding pieces unless you use some type clamps.
I know I'm not explaining this very well but I found something similar with good instructions that you may be able to adapt to your situation.
www.instructables.com/
These are called Murphy beds or cabinet beds. I have a site here that shows 12 different DIY cabinet beds you can make at home. www.thespruce.com/
These are different home projects that people have made for their homes to save space and add to the size of the room. I think that a few of these would be good for you to look into because you can adapt them to the armoire that you already have and wouldn't need to do too much to make this work for you.
Your basic issue would be to get the mounting brackets that would work with your bed frame so it could be mounted into the armoire that you have.
I assumed you have an Armoire that you wish to keep but would like to have it also serve as a 'put-a-way bed - maybe you have a small space problem?
You did mention 'cheapest way' in your posting so I assumed you planned to build this yourself as any kind of 'ready made' Murphy Bed is going to cost a lot of money.
If you plan to buy a new Murphy Bed I would suggest you have a carpenter/cabinet maker build one the way you want it - custom made.