I believe the two applicable options to have a company that counts as its own "person" is either AG or GmbH (~= LLC / "limited").
There is also SE which is a EU form for an AG, and various "partnership" forms that involve a partner that's fully liable. Usually, that partner is not an actual person but a "legal person", i.e. another SE or GmbH.
Even if you're not listed on a stock market, you might want to take on investments, e.g. "give me 10 million for 5% of the company" and I assume the latter is much easier with an AG.