Shouldn't everything be faster with bit-boards?
-get a bit-board for the piece in question via bitscan
-get a bit board representing all places it could go on an empty board via table look up
-logical "and" the "to" bit-board with: A(not your sides pieces) B(the pin ray) C( ways to exit check: aka capture the piece giving check or get in the way of slider)
-index the bit in "from" and then each bit in "to" while appending moves to the movelist
A is readily available, B can C can be calculated quickly. Pawns can only be "anded" with C if it is a pawn capture or C is not a an enemy piece. Make un make( during movegen) can be done for king, EP and castle moves.
Edit:
Actually I meant get an index for the piece in question at first.