How to store auxiliary data in a tensor aside from the data for the tensor elements?

Are there any examples/tutorial that exhibit extending the Storage/StorageImpl classes, preferably, as a cpp extension? I gather that one would need to do that if they were to support storing some auxiliary data (say, some metadata) in a tensor object along with the data elements.