Essentially if I start with the number 57, I want to end up with the array ( 1, 0, 0, 1, 1, 1 ) (low bit is the first element).
Alternatively, if I just had a good way of checking the xth bit of a number without building a bitmask (unless someone can clue me in on how to do that quickly) that would work.
This just sounds so bizarre to me that I can't comprehend what is being attempted. To reverse 57 decimal, 111001b to 100111b is
extremely counter intuitive! Yes, there are assembly level instructions that can do that with multiple instructions involving various kinds of masks and shifts but, that would be a wild thing to do. I think this is even more difficult to do in Perl.
There is no faster way of testing if a bit is set other than using a bit mask and a logical "and" instruction. The lowest level assembly language instructions do it that way.