How to access elements in an array through a SerializedProperty?

I am trying to modify the elements in an array via a SerializedProperty. However, I cannot seem to figure out how to. I can increase the array size and such, but I can’t seem to directly access and modify an element in the array.

When it comes to single values, say a float, I can modify it as such:

SerializedProperty m_Speed;

    public void OnEnable()
    {
        m_Speed = this.serializedObject.FindProperty("speed");
    }


    public override void OnInspectorGUI()
    {
        this.serializedObject.Update();

            EditorGUILayout.PropertyField(m_Speed);
            if(m_Speed.floatValue < 0)
            {
                //Prevents value from going below 0
                m_Speed.floatValue = 0f;
            }

        this.serializedObject.ApplyModifiedProperties();
    }

How can I do this with an array?

Here is how it’s done:

SerializedProperty m_Speed;
	public void OnEnable()
	{
		m_Speed = this.serializedObject.FindProperty("speed");
	}
	public override void OnInspectorGUI(){
		serializedObject.Update ();
		for (int x = 0; x < m_Speed.arraySize; x++) {
			SerializedProperty property = m_Speed.GetArrayElementAtIndex (x); // get array element at x
			property.floatValue = Mathf.Max (0,property.floatValue); // Edit this element's value, in this case limit the float's value to a positive value.
		}
		EditorGUILayout.PropertyField(m_Speed,true); // draw property with it's children
		serializedObject.ApplyModifiedProperties ();
	}