First, if you do it with an int, you’re probably using up 32bits per value.
One project I worked with stored boolean values as bits in an 8-bit int, and then used binary math to read and write individual bits from that int, with each bit representing a distinct and independent boolean variable.
Really weird, complicated, and sounds kind of dumb ... but it worked, and it was extremely memory-efficient.