X-Wing operates on two rows (or columns) aligned with two columns (or rows). Can it be extended to three rows and columns? Logically yes, and we’re taking about a grid of nine cells here, not four, but interestingly not everyone of the nine cells needs to have the number under consideration.
Let’s look at the Sword-Fish ‘grid’ and see what’s going on. Here we are looking at all the 5 candidates in this Sudoku, everything else removed.