Scult, armature modifier and bmesh

I have a mesh with armature modifier (active+posed) and wish to do some modifications with vert coords (after armature deformations) saved in shape key on that mesh. But currently it seems not possible - shape key contain coords before modifiers and armature can change each vertex in unpredictable manner. So to save final coord back into original mesh coord (on each vertex) - i have to revert armature deformations some how… and this seems to be generally impossible //

In other words - for every given vertext coord, after all deformations (armature) and after applying some custom movements i need (i can calculate them only on final mesh) that i need - i need to calculate ORIGINAL coords (that can be saved in shape key) so they will give me my final position after applying armature.

Interestingly enough, Sculpt mode manages to do this somehow - you can scult posed mesh with active shapekey and it will put into shapekey proper position related to undeformed mesh. Not the coords that can be seen on screen.

Is it possible to do the same in Python? May be there is a way to do “sculpted translate” for vertex, that will do all the revert magic? any suggestions welcome

Answering own question: Ended up by applying deformations as displacement with custom texture AFTER armature… shapekey is essentially just a displacement for verts, after all, and making this displacement after armature make more sense. and easier to implement (just baking verts shift into packed image)