Don't use arrays to represent the board ... Binaries are the language for computer.
The pieces of a player (Noughts or Crosses) can be listed with a unique binary !
This binary is 0 at the beginning and increased of 1<<c (one bit left shifted of c), if the player choose the cell c (from 0 to 8). See the source of the proposal game.
Then the win positions are represented only with an array of 8 integers,
The first one is (1<<0) + (1<<1) + (1<<2) = 1 + 2 + 4, the second is the first shifted of 3 or multiplied by 8 ... etc.
The tests are very simple with bitwise operators : a position p win if there is an i for which p&winPos[i]==winPos[i] !
NB : For other non trivial games see the Gomoku
and the list of the solved games