En passant is stored in the balls
I have been working on a simple little chess program in C++ for the past couple of days, and I've made some interesting observations about chess that I wasn't consciously aware of until now.
While setting up the board and letting the user move the pieces around is fairly trivial, evaluating legal moves can be pretty tricky -- for example a legal move cannot result a check against yourself, you cannot castle while being checked, and so on.
Chess received some neat patches over the centuries, one of them is en passant which was more like a nerf to the rule allowing pawns move two squares on their first move. If you try to run past an enemy pawn, the opponent can capture it on its way:

White will be on d6 and d5 is removed.
The interesting thing about this and castling (swapping the king and the rook in a single move) is that while most information about the state of the game is stored on the board, the right to do these two is not.
The chessboard is an 8x8 array that will tell you which pieces are where. But let’s say we have this position, where both kings are about to castle. Instead of castling, they make the nonsensical, yet legal, moves of shifting the king one square to the right and then back to its original position:

This results in the same position, but if you now enter this position into a chess engine like Stockfish, it will tell you that castling is one of White’s best moves from this position. But it is an illegal move in this case (the king can only castle on its first move).

You can create a similar scenario in different ways for en passant with pawns too, where it looks like en passant is possible, but it isn't.
Of course, this has no real-life relevance; usually engines analyze whole games, not random snapshots, and even if they do, the player can just ignore invalid moves. Also, to create a situation that looks like en passant or castling is possible even when it isn’t, one must make some nonsensical meme moves.
Still, it is interesting because it shows that these two aspects of the game are derived from the sequence of moves and are not stored directly on the chessboard.
(Screenshots from chess365.com)