PowerShell: clipboard / spreadsheets

Normally you would do most of this stuff with a formula or macro in a spreadsheet. For the purposes of this, let’s assume you don’t have that ability:

(I’m using small numbers, but of course the principle can be extended to much larger sets.)