I have found this question just by surfing TeX.SX, and I thought I'll post an answer not recreating the questioner's figure, but the Arecibo message that I have “typesetted” a while ago in TikZ and LuaLaTeX.

In the code I'm only iterating over a huge two-dimensional array which contains the “message”, and creating nodes according to the values at a given index.
\documentclass{article}
\usepackage[nohead,%
nofoot,%
nomarginpar,%
paperwidth=210mm,%
paperheight=297mm,%
tmargin=5mm,%
rmargin=5mm,%
bmargin=5mm,%
lmargin=5mm,
vscale=1,%
hscale=1]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usepackage{luacode}
\newlength{\zeropt}
\setlength{\zeropt}{0pt}
\setlength{\parskip}{\zeropt}
\setlength{\parindent}{\zeropt}
\setlength{\baselineskip}{\zeropt}
\tikzset{%
cell/.style={%
minimum size=0.35cm%
}%
}
\tikzset{%
one/.style={%
fill=White%
},%
two/.style={%
fill=DarkOrchid!50!Fuchsia%
},%
three/.style={%
fill=LimeGreen%
},%
four/.style={%
fill=Blue!65!Cyan%
},%
five/.style={%
fill=Crimson!50!Red%
},%
six/.style={%
fill=Gold!50!Yellow%
}%
}
\pagestyle{empty}
\begin{luacode*}
arecibo_message = {{0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0},
{0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0},
{0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0},
{0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 4, 4, 4, 4, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 4, 4, 4, 4, 0, 0, 0}}
function print_message(message)
local cols = #message[1]
local rows = #message
tex.sprint([[\begin{tikzpicture}]])
for j = 1, cols do
for i = 1, rows do
if message[i][j] == 1 then
tex.sprint([[\node[cell, one] at (]])
elseif message[i][j] == 2 then
tex.sprint([[\node[cell, two] at (]])
elseif message[i][j] == 3 then
tex.sprint([[\node[cell, three] at (]])
elseif message[i][j] == 4 then
tex.sprint([[\node[cell, four] at (]])
elseif message[i][j] == 5 then
tex.sprint([[\node[cell, five] at (]])
elseif message[i][j] == 6 then
tex.sprint([[\node[cell, six] at (]])
end
if message[i][j] ~= 0 then
tex.sprint(0.35 * (j - 1))
tex.sprint([[cm,]])
tex.sprint(0.35 * (-i + 1))
tex.sprint([[cm){};]])
end
end
end
tex.sprint([[\end{tikzpicture}]])
end
\end{luacode*}
\begin{document}
\pagecolor{Black}
\vspace*{\fill}
\begin{center}
\luadirect{print_message(arecibo_message)}
\end{center}
\vspace*{\fill}
\end{document}