I need to arrange several pictures, then labelling each picture and draw arrows between some labels (of the same and also different pictures). I think this can be done with tikzpictures in tabular. So far I have this MWE:
\documentclass{article}
\usepackage{tikz, tabularray}
\begin{document}
\begin{tblr}{colspec={X[c]X[c]}, rows={m}, cell{2}{1}={r=2}{}}
\tikz[overlay, remember picture] \node[inner sep=0pt] (im1) at (0,0) {\includegraphics[width=0.4\textwidth]{example-image-a}}; &
\tikz[overlay, remember picture] \node[inner sep=0pt] (im2) at (0,0)
{\includegraphics[width=0.4\textwidth]{example-image-b}}; \[1cm]
\tikz[overlay, remember picture] \node[inner sep=0pt] (im3) at (0,0) {\includegraphics[width=0.4\textwidth]{example-image-c}}; &
\tikz[overlay, remember picture] \node[inner sep=0pt] (im4) {\includegraphics[width=0.4\textwidth, height=2cm]{example-image}}; \
& \tikz[overlay, remember picture] \node[inner sep=0pt] (im5) {\includegraphics[width=0.4\textwidth, height=2cm]{example-image-plain}}; \
\end{tblr}
\end{document}
One can see there is no spaces between pictures. I tried to add baseline = (im1.center) option to the first tikz (and similar im2.center to the second tikz), this does not help. How can I arrange these tikzpictures?
And how can I add coordinate system to each picture so that I can use this in further drawing of arrows, somehow like \draw[->] (im1 cs: 0.1, 0.2) -- (im2 cs: 0.4, 0.7)? Here I assume coordinates relative to the whole image sizes.
Thank you for any help.

overlayout from each picture. – Andrew Stacey Oct 08 '21 at 05:45\ar[r]will draw an arrow from current cell to the right cell. – tobiasBora Oct 08 '21 at 05:50