If you replace the diode in a boost or buck converter with a second switch that is turned on and off complementary to the other one, they are the same circuit run in opposite directions. Just an observation.
There's actually a bunch of ways to make buck-boost style converters that can do both functions, like the cuk and sepic topologies. There's also bidirectional bridge converters that can change input and output direction - you see this a lot on hybrid vehicles (12V to 48V or vice versa) and electric vehicles (48V to 400V and vice versa).