How to generate dataset from runtime?

Hello everyone, I started small project with tensorflow, and stack with some problem.
My problem also described there.

python - How to create tensorflow dataset from runtime generated images? - Stack Overflow

Shortly, I have some number of runtime generated images, presented as PNG image, encoded as byte array. I receive this images, preserve in data structrure, and, when I collect it all, I what to prepare dataset and train model based on it.
And, I could not understand, how to create dataset from array of byte sequences. What should I do?

Please refer to the solution here