XOR and XNOR operations with 2 or 3 inputs

I still think looking up the result in an array could be the best way to go.
Can be made to output whatever function you wanted.
byte XORarray[] = {
0, // 000
1, // 001
1, // 010
0, // 011
1, // 100
0, // 101
0, // 110,
0, // 111
};
byte XNORarray[] = {
1, // 000
0, // 001
0, // 010
1, // 011
0, // 100
1, // 101
1, // 110,
1, // 111
};