I found a Wm 1837 of Boharm married in 1870 another Marg Hay born 1848 and they had Jane in Huntly in 1871, Mary 1874 and Elizabeth 1881
Could you possibly be confusing William
Mackenzie, who married Margaret Hay in Boharm in 1870, with William
Gordon, probable brother of Ann Gordon, who married a different Margaret Hay and lived at Drumgrain in Inveravon?
In any case, according to the 1871 census, William Mackenzie, husband of Margaret Hay, was born in Cairney, not Boharm, and he was 30, so (assuming that his age is correct) he was born in 1840/1841, not 1837.
As the only thing about him that matches is his name, I think you can safely dismiss him.
Your William Mackenzie was baptised in January 1824, so he would have been 47 on the date of the 1871 census. There are 1,309 William M(a)ckenzies in the 1871 census in Scotland. Of these, 44 were born in 1824 plus or minus two years. I have looked at every single one of these 44 William M(a)ckenzies and none of them was born in CIA or anywhere close to it. Therefore (barring deficiencies in the census and in the transcription I am using), your William M(a)ckenzie was not in Scotland on the day of the 1871 census.
There are also 10 in England, of whom there are 3 aged 47 and born in Scotland: one each in Liverpool, Shrewsbury and Croydon.
In 1851 there were 89 William M(a)ckenzies born 1824 plus of minus two years. I baulked at 89, but I looked at all of the 49 born 1824 plus or minus one year. Of these, none was born in CIA. The only one who could possibly be yours is the one in Shrewsbury, who was a draper and tea dealer's assistant.
So I took a look at the 1861 census for Shrewsbury, and the household consisted of
William McKenzie, 37, draper and tea dealer
Ann McKenzie, sister, 20, house keeper
John McKenzie, brother, 18, draper's assisant
all born Scotland.
So I am pretty sure that these are the family of your William Mackenzie.
In 1871 William is listed with his wife Charlotte but no children. William Mackenzie married Charlotte Sears in King's Norton in 1870. Therefore I think you can almost certainly eliminate William as a potential father of your Henry. Certainly not a legitimate father.
I can't (so far) find John in 1871 or later.