Automated three-dimensional warehouses