The adverb william-nilliam means whether one likes it or not; haphazardly. It is a humorous variant of willy-nilly, after the personal name William—William being familiarly shortened to Willy.
Etymological note: First recorded in 1608, the adverb willy-nilly is a variant of will I nill I, will he nill he, will ye nill ye, etc., with the pronoun forms I, he, ye, etc. eventually reduced to meaningless syllables providing an internal rhyme.
These are, in chronological order, the earliest occurrences of the adverb william-nilliam that I have found:
1-: From a letter to ‘M.C.B.’, dated Oxford, 9th September 1907, by the British literary scholar George Stuart Gordon (1881-1942)—as published in The Letters of George S. Gordon 1902—1942 (Oxford University Press, 1943):
It’s old Falstaff’s ‘sweet lad, sweet boy Hal’ that’s running in my head, God forgive me—and so I have called you sweet girl. But I will not therefore retract; and so sweet girl you must remain william nilliam. This last touch has given my style a lift—you must feel it? I was running too loosely.
2-: From one of the unconnected paragraphs making up the column The Conning Tower, published in the Buffalo Courier (Buffalo, New York, USA) of Saturday 8th March 1924:
“I know Formal Flora,” writes Mark Harris, “and she’s going to get into The Conning Tower williamnilliam.”
3-: From the column Nuts and Wine, by ‘Mr. Mayfair’, published in the Sunday Pictorial (London, England) of Sunday 6th December 1931:
“I can’t help detesting pet names,” says a professor. I suppose he would say he does so william-nilliam.
4-: From Between you, me and the lamp-post, an advertisement for Gutman’s department store, published in The Sun (Baltimore, Maryland, USA) of Friday 29th March 1935:
I KNOW A girl whose taste in clothes is impeccable, but who used to think that make-up was something to be grabbed off bargain counter william nilliam (willy-nilly, to you)! I persuaded her to talk to the beauty expert (who looks it, too!) at at [sic] our cosmetics counter. She was given a Daggett & Ramsdell make-up chart, bought the correct cosmetics for her coloring. . . and is she pleased! Her complexion is a work of art. . . not the slapdash affair it used to be.
5-: From the column One On The Aisle: Concerning Things Theatrical—Mostly, by W. W. Dunkle, published in The South Bend Tribune (South Bend, Indiana, USA) of Sunday 7th April 1935:
1913—1935—Present! Once more the Aisle checks in, punches the time clock and rings up another year—without missing an issue. […]
The editors have been kind enough to overlook our expressions of personal opinions, exaggerations, show shop slang and other breaches of newspaper ethics for which The Tribune is usually insistent. We have tried to be accurate, and fooling around the theaters and circus lots for 40 years has enabled us to pick up some bits of intimate gossip and interesting facts William Nilliam (willy-nilly, to you).
6-: From the Surrey Mirror (Reigate, Surrey, England) of Friday 14th January 1944:
THE AUDACIOUS SQUANDERBUG. *
MR. AND MRS. CARELESS-SPENDER “NABBED” AT REDHILL.
A “MOVING DRAMA” FOR SATURDAY SHOPPERS.
Some Redhill shoppers, unaware of what was “in the wind,” rubbed their eyes, pinched themselves, or did other things which the uncertainly awake are supposed to do, when on Saturday afternoon they espied capering and dancing in Station-road, a real live Squanderbug. Then, having got over their initial surprise, they accepted what followed as another addition to the excitements of Saturday afternoon shopping.
Just as the Squanderbug was thumbing his nose (only metaphorically, of course!) at the Redhill Savings Centre on the opposite side of the road, there emerged from the Warwick Hotel a couple who were obviously destined by fate for a Squanderbuggian bite; their visiting cards, obligingly hung round their necks, proclaimed them to be Mr. and Mrs. Careless-Spender. Mrs. C-S. seemed not to notice the ingratiating tap on the shoulder with which the Squanderbug made his preliminary advances, so it tried her hubby, and received for its pains a poke in the ribs from an umbrella. The bug was not deterred; he knew from experience that nobody sets out william-nilliam in war-time to spend money which is needed to beat his pal Hitler.
* Introduced in 1943 by the National Savings Committee, the squander-bug, represented as a devilish insect, was a symbol of reckless extravagance and waste, first used in a government publicity campaign promoting economy during the Second World War (1939-45).—Cf. ‘squander-bug’: meanings and origin (British usage).
7 & 8-: From two books by the British actor Peter Cecil Bull (1912-1984):
7-: From I Know the Face, But… (London: Peter Davies, 1959)—as quoted in the Oxford English Dictionary (3rd edition, September 2021):
A splendid change from ordinary digs where the plate is plonked in front of you william-nilliam.
8-: From I Say, Look Here! The Rather Random Reminiscences of a Round Actor in the Square (London: Peter Davies, 1965):
I had heard just before the rise of the curtain that a dear but temporarily unbalanced chum of mine had taken just the eighty aspirin as the result of a domestic crisis. He had been parked william-nilliam in my flat by a mutual friend who was busy at the time. So for once on a fist night, my mind wasn’t entirely on my work.
9-: From Himie Koshevoy’s column, published in The Province (Vancouver, British Columbia, Canada) of Monday 4th January 1971:
“Aha,” I said. “Now you’re going into that Women’s Lib thing. You’re going to assert that you’re an equal partner and that everything you do around the house should be as well paid as I am for the work I do.”
“We’ll skip the work part,” she said. […] “Since you started the Lib discussion perhaps I shouldn’t say ‘May I have the car today?’ and declare instead that I am going to it William—Nilliam.”
10-: From Robert B. Parke’s Editorial, in Flying (New York: Ziff-Davis Publishing Company) of August 1971:
If the weather was universally clear at all times, there would be little to complain about. Pilots could fly whenever they wished, william-nilliam, without having any more to do with traffic control than they desired.
11-: From the review by Richard Smoley of Krazy Kat: The Comic Art of George Herriman (New York: Harry N. Abrams, Inc., 1986), published in the San Francisco Chronicle (San Francisco, California, USA) of Tuesday 5th August 1986:
The characters speak in an allusive diction that’s half James Joyce, half Borscht Belt (“Just imegine having your ‘ectopasm’ running around William & Nilliam among the unlimitliss etha—golla, it’s imbillivibl”).