I want to draw the image given below. I am able to draw array with some arrows but not able to draw the exact image.
See my code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pdftexcmds}
\usepackage{tikz}
\usepackage{booktabs}
\usetikzlibrary{positioning,matrix, arrows.meta}
\usetikzlibrary{decorations.pathreplacing}
\date{February 2018}
\begin{document}
\begin{tikzpicture}
\matrix (A) [ampersand replacement=\&,matrix of nodes, nodes={draw, minimum size=8mm},
column sep=-\pgflinewidth]{
3 \& 4 \& 4 \& 1 \& 4 \& 1 \& 2 \& 3\\};
\foreach \i [evaluate=\i as \ni using {int(\i)},
evaluate=\i as \ntext using {int(\i-1)}] in {1,3,4,6}
\draw [{Stealth}-, red!70] (A-1-\ni.south west)--++(-90:5mm) node[below] {\ntext};
\end{tikzpicture}
\end{document}
complied output:
Question : How to draw the image with tikz?