Extensions of the Morse-Hedlund Theorem