We develop a graph-theoretic characterization of controllability and observability of linear systems over finite fields. Specifically, we show that a linear system will be structurally controllable and observable over a finite field if the graph of the system satisfies certain properties, and the size of the field is sufficiently large. We also provide graph-theoretic upper bounds on the controllability and observability indices for structured linear systems (over arbitrary fields). We then use our analysis to design nearest-neighbor rules for multi-agent systems where the state of each agent is constrained to lie in a finite set. We view the discrete states of each agent as elements of a finite field, and employ a linear iterative strategy whereby at each time-step, each agent updates its state to be a linear combination (over the finite field) of its own state and the states of its neighbors. Using our results on structural controllability and observability, we show how a set of leader agents can use this strategy to place all agents into any desired state (within the finite set), and how a set of sink agents can recover the set of initial values held by all of the agents.