In most cases it's just a SATA drive. As long as you aren't going to something so large that it needs 4k to format full capacity, there's not going to be any limitations.
AIOs often use laptop style drives, so you won't run into a 4k issue.
Beyond the hardware, you need to worry about the software.
You going to image the old drive onto the new drive?
You'll need software for that, plenty of options are available free, there have been several threads on that in the past year... you may need a 2nd computer for that if the AIO doesn't have an extra SATA port free.
You going to fresh install?
Be sure you have all the drivers you need and some install media... most assembled PCs don't come with install media, only a Certificate of Authenticity stuck to the case somewhere.