Shape keys are currently stored in a Key datablock, separate from the Mesh, Lattice and Curve datablocks.
This is invisible to the user, and each geometry datablock can be associated with exactly one Key datablock.
This makes datablock management code unnecessarily complicated. To simplify the internal implementation, we should embed the shape key data in the geometry datablock. Potentially shape keys could be stored as customdata layers.