Can you store a reference to a primitive value?

I have a class that stores a large array (it holds one scalar double value for each vertex of the mesh it’s attached to). I want to give the user the option to display the scalar value at a specific vertex on some UI text. But accessing the array of my original script over and over again in the Update function seems wasteful.

I would actually like to just keep a permanent reference to that specific double value in my original array, so I can just do an array access once, and my reference will forever be able to tell me the value there.

    public class Example : MonoBehaviour
    {
        public double[] scalars = new double[mesh.vertices.Length];
        void Awake()
        {
            ...fill scalars...
        }
        void Update()
        {
            ...scalars changes...
        }
    }
    
    public class ExampleInfoDisplay : MonoBehaviour
    {
>>>>>>> public ref double numReference; <<<<<<<
        public int indexToFollow;
        public Text uiText;
        void Start()
        {
            numReference = gameObject.GetComponent<Example>().scalars[indexToFollow];
        }
        void LateUpdate( )
        {
            uiText.text = numReference.ToString();
        }
    }

This might not seem like that much work, but because of how the rest of my system works, my real script actually has to do a lot of nested array accesses to get the correct value, since I’m using Dictionaries paired with other arrays and so on. The real access in my LateUpdate looks more like:

public class ExampleInfoDisplay : MonoBehaviour
{
    ...
    Example example;
    void LateUpdate()
    {
        uiText.text = example.scalars[example.vertDictionary[example.uniqueVerts[indexToFollow]][0]].ToString();
    }
}

I know that I could just make a wrapper class called Double which stores a double value, and then make scalars an array of Double instead of an array of double. I would like to just be able to store a single reference when I need it, since an array of 64-bit doubles is already quite large, and I would rather not have to store an array of 64-bit references which each have their own 64-bit values.

TLDR: I know that you can pass values by reference to methods using the ref, in, or out keywords, and that knows how to create a one-time reference to that primitive value. But what I need to know is, can you store that reference somehow and reuse it?

Numerical types are structs. They get passed by value (Sort of Copied). Just store a copy of its value or a copy of its index and then you can look it up when ever you need it.

Note: You can use pointers to structures in c# in unsafe code blocks. Please dont.