I don’t know of a way of directly customizing layer data and as far as I know from the Photoshop file spec there are no hooks in the layer data to accommodate custom data. That said there is support for arbitrary metadata on the document level and so you could add per-layer data by storing/accessing it by e.g. layer ID (obviously you’d have to come up with a way of handling layer merging and duplication etc.). There is a lengthy thread about accessing document metadata here: Document XMP metadata