Hi Sarah,
I always move some of the others at the ends of the rows into the gaps and then use the 'mini borders' which this leaves at the ends, in my case it is along my path, for lettuce or flowers.
I did look up onions and Garlic.for you in a companion planting table and it says you can safely put Beetroot, Chard, Lettuce, Strawberry or Summer Savory with onions.
Hope this helps!
Donna :D