Fortran has a non-owning pointer and an owning allocatable. In some cases also having a reference counted pointer (like std::shared_ptr in C++, or like the classes work in Python) would be helpful.
This has been requested a few times, some relevant past discussion: