for example creating a fill using Edit > Fill with a random Color and Opacity in the Fill dialog, then later without the original information about the Color and Opacity but just the file, how can I make exact same fill and opacity again?
If you have a partially transparent layer then use "Layer > Layer Mask > From Transparency" to convert the layer to full opacity plus a mask.
That'll give you the colour of every pixel and a grayscale representation of the opacity of every pixel.
This was great help Conroy, I tested filling a selection with a random color and opacity of 43%. Layer Mask from Transparency gave the original color and the gray value of the mask is 57%. So, I guess 100 minus the gray value will give the Opacity needed for the Edit > Fill, to recreate and match, correct?