Generating white's back rank is sufficient for output, e.g. QRKNBNRB
There are 8! = 40,320 possible permutations of the back rank, including 40,320 - 960 = 39,360 invalid positions
By definition, this application doesn't need to scale (i.e. the chessboard remains 8x8)
Generating all 40,320 permutations should present no problem, speed-wise
So, a quickly-written prototype — generate all permutations and simply filter out the invalid ones — should be good enough even for "production" use :-)
Purely-functional program (except for printing)
Then I can either print all of them or choose a starting position at random