A simple method would be to create a second property where you would store all the previous values of the first property. Another method would be to store each value in its own node. Those are 2 convenient methods that come to mind.
And how can I obtain the previous value before modification ?
What is your end goal ? If it is to compare property before any change, then add a listner to your dialog and then get value before save. I don't have exact example but you can use something like this https://blogs.adobe.com/contentmanagement/tag/cq-duplicate-vanity-url/.