Modular shelves and cabinets