Hello Emmi,
I know you said William's parent were Thomas and Rachel (married in Halifax) but I can't see how this can be so, given that William was from Brampton.
I think William was the son of Samuel (my 3xgrt grandfather) and Ann Burgin. They had Sarah (bapt. Greasbrough 1/11/1807), William (bapt. Greasbrough 4/2/1810) and Mary (bapt. Wath 3/10/1813, died 22/5/1817). The family would have moved to West Melton (part of Brampton at that time) by the time William was 3 years old as Mary was born there. Samuel was widowed in 1814 and re-married in 1815. Children from this marriage were Samuel, Mary Ann, John and Elizabeth. It was this John Mellard that Varah was boarding with in 1871, his father's half uncle.
William's grandmother, Sarah (nee Norton) was baptised at Netherton, which may explain the connection with this area of the West Riding.