Cargo Racks can be found in ship wreckage points of interest on the surface of planets and moons. When they are destroyed by weapons fire from a ship or SRV they break apart and release Materials, which can be collected using a ship's or an SRV's Cargo Scoop.
The canisters they contain are not as large as normal Cargo Canisters and have a different appearance. They contain materials, not normal cargo, so this type of cargo rack appears to be where ships store materials. Destroying Cargo Racks will always yield 1-2 different materials, and each sample yields 3 units of that material.