a4paper, where should I declare it? In document class or geometry?

a4paper specified in document class will be passed to geometry. So there is no difference in your case if you specify the option in \documentclass{article} or \usepackage{geometry}.

However if other packages need to know document format, you need to specify a4paper in the document class.


I'm not sure about the changes, but I think the standard way is the following:

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
...

You can specify the margins further. The simplest way is writing

\usepackage[a4paper, margin=2cm]{geometry}

There might be a difference if you load some other packages that could use ...paper options. It is naturally global option of your manuscript so I think it is better declared global, similarly to the language options discussed here: https://tex.stackexchange.com/a/60298/11002

So I think that ...paper should be put as a global option of \documentclass.