Joomla has fields which can be added to articles. For example a datepicker and an image field. The problem is I can only add one image, is there a possibility to add multiple images?
The best would be if it is stored in json format to the database.
I am using joomla 3.9
In the past there was a gallery field but they have removed that in newer versions of Joomla.
You use the List of Images or Media custom field in Joomla for that. The List of images field provides you a field with a dropdown list of images in a particular folder (which you setup when you create this custom field). The Media field provides you image upload possibilities.
For custom fields in an article
And you just created a new field.
It is also important that in order to see the custom fields in your article editor, you have to show article options slider in the Backend article edit view for showing the custom field tabs. So activate Show Article Options. You can set this in Global Configuration->articles (from the left side menu items).
I hope this is what you were looking for.
UPDATE
I'm sorry I just realized that you need upload capability of the field. Then you have to create a Media custom field with the same method as described above. It has multifile upload capabilities and as far as I know, the images is in json format in the db.
UPDATE - GALLERY MANAGEMENT
Since the question got a bit cleared by the OP in the comments finally and it came out that the question is how to upload and INSERT multiple images in an article, then my suggestion is for you not to invent the wheel regarding Joomla, try to use Phoca Gallery component and plugins which is great free extension package for Joomla and I think it can serve your purpose quite well:
https://www.phoca.cz/phocagallery