Extract index storage into separate types.