What confuses me though is how do you store the component in an efficient way? My understanding of the entity-component system is that it simplify things, and reduces cache misses, right?
I have similar topic http://www.gamedev.net/topic/662559-entity-component-system-data-locality-vs-templates/ and I was directed to this bitsquid blog that I found very helpful. Making a manager for each type of component avoids problems with storing inhomogeneous data in arrays. I also liked their idea not to constrain the component managers that much. Different type of components may benefit from different type of component storage and entity<->component indirection. I personally would create base component manager classes for some most typical situations to avoid code dublication.
I.E. When a player shoots a ship, and the ship is now dead. It should be removed. So it's flagged as such, and at the end of the loop, it gets removed from the list, and everything gets shifted down to keep data clustered tightly.
Use the "swap and resize": move the last item to the place of the removed one and reduce the array size by one. Of course if entities refer directly to component arrays, the one moved component will no longer point to the correct entity. You need to add a layer of indirection: one array stores components, the other maps entities to the components.