Question is pretty simple, i'm trying to make a villager-powered carrot farm in spawn chunks, but I want to know if carrots are like saplings and grass and need to be within a certain range of a player in order to grow.
Not only the chunk needs to be loaded, but their growth also depends on "random ticks", which only happen in a roughly 128 block radius around the player. The exact definition from the wiki (archive):
On every game tick, each chunk within the render distance of a player and with centers within 128 blocks of a player are ticked.
The long and short of it is that plants grow (as well as other processes, such as smelting, or animals growing, etc.) in loaded Chunks. Normally, a player does need to be in range of a Chunk for it to be loaded. If they plants are in the loaded Chunk, they will grow. If they are not in a loaded Chunk, they won't grow.
However, there are some exceptions to this. Spawn Chunks are permanently loaded. Any and all activity will continue in these Chunks, regardless of whether or not the player is in range.
Additionally, you can create Chunk loaders that can keep Chunks loaded, in a similar fashion to the spawn chunks, but the downside is that this is a little complicated, and can create a heavy load on your PC.