This is outdated info. The latest iPad Pro has the M1 chip, exactly the same as the MacBook. And it comes in 8/16gb ram.
The magic keyboard accessory apple sells for the iPad also turns it in to the same form factor as a laptop.
You very realistically could replace a MacBook with an iPad Pro and magic keyboard if apple let people run macOS on it.