All the numbers $1, 2, 3, 4, 5, 6, 7, 8, 9$ are written in a $3\times3$ array of squares, one number in each square, in such a way that if two numbers are consecutive then they occupy squares that share an edge. The numbers in the four corners add up to $18$. What is the number in the center?
$\textbf{(A)}\ 5$ $\textbf{(B)}\ 6$ $\textbf{(C)}\ 7$ $\textbf{(D)}\ 8$ $\textbf{(E)}\ 9$