\begin{document}
	\begin{tikzpicture}[scale=2, ultra thick,
	every node/.style={draw=black, rectangle, very thick, font =\huge, rectangle, minimum width=5em, minimum height=3em},
	]
		\foreach \i in {0,1,2,3}{
			\foreach \j in {0,1,...,5}{
				%\pgfmathsetmacro{\result}{\i+\j*4};%小数结果
				\pgfmathtruncatemacro{\result}{\i+(5-\j)*4};%整数结果
				\node[fill=gray!20] at(\i*1.5,\j) (\result){\result};
			}
		}
		\draw[-latex] (9) -- (2);
		\draw[-latex] (2) -- (23);
		\draw[-latex] (23) -- (14);
		\draw[-latex] (14) -- (16);
	\end{tikzpicture}
\end{document}
\begin{document}
	\begin{tikzpicture}[scale=2, ultra thick]
	\tikzstyle{every node}=[font=\huge, draw=black, very thick, rectangle, minimum width=1cm, minimum height=1cm]
		% 字符串
		\def\mystring{H,e,l,l,o, ,w,o,r,d,!}
		% 循环遍历字符串并创建节点
		\foreach \char [count=\i] in \mystring {
			\node[fill=gray!20] at (\i-1,0) {\char};
		}
	\end{tikzpicture}
\end{document}