Since tomatoes are taller than asparagus, I think the tomatoes would go in the back; the asparagus would go in front of the tomatoes; then, the garlic and onions could be interspersed with each other in front of the asparagus. I am not qualified to say whether it is worth your time or not to bother trying to incorporate them all together; however, with anything, there is usually risk, sadly. For gardens, it is possible wasted time and money. One idea of mitigating this would be- as silly as it seems- to just not try at all; a combination of the Masanobu
Fukuoka techniques and
Ruth Stout would be to just toss rotten tomato guts with seeds, asparagus seeds, onion seeds, and garlic bulbs as you use them and let the plants decide for themselves when and where they want to grow. Nothing would be guaranteed, but since minimal money and effort is put in, it would be easier to acquire a net gain. Here is a nice movie about Masanobu Fukuoka:
I think this vegetable cheat sheet that was mentioned earlier on permies may be useful, too: