operator[]のオーバーロード
C#で自作クラスにoperator[]を追加したい場合は次のような感じで実装できます。
class Example
{
  int[] _ar = new int[10];                                                                       
  
  public int this[int i]
  {
    get => _ar[i];                                                                        
    set => _ar[i] = value;                                                                       
  }
}Exampleクラスを使う方は次のような感じです。
var example = new Example();
example[2] = 345;
Debug.Log($"example[2] = {example[2]}");実行結果
example[2] = 345多次元配列
多次元配列のような感じで使いたい場合も次のような感じで実装できます。
class Example2
{
  int[,] _ar = new int[10, 10];
  public int this[int i, int j]
  {
    get => _ar[i, j];
    set => _ar[i, j] = value;
  }
}Compiler Error CS0720
static classにoperator[]を実装しようとするとCS0720というエラーになるようです。気を付けてください。
/* static */ class Example3
{
  public int this[int i]
  {
    get => 0;
  }
}※配列の範囲外にアクセスしようとするとIndexOutOfRangeExceptionという例外が発生します。実際に使う場合は注意してください。