title: Kotlin: Acessing function asynchronously
body: <p>I accessed a function that returns array for my RecyclerView. How do i load the array async?
  I load the function as such:</p>
  
  <pre><code>var content = ContentList().list(navBarTitle)
  </code></pre>
  
  <p>ContentList class:</p>
  
  <pre><code>class ContentList {
  
      fun list(title : String):Array&lt;Array&lt;Int&gt;&gt;
      {
          var contentTitle : Array&lt;Array&lt;Int&gt;&gt;
          if (title == "Hijaiyyah Letters")
              contentTitle = arrayOf(
                  arrayOf(R.drawable.ic_intro1_1, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_2, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_3, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_4, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_5, R.raw.blurp_x),
                  arrayOf(R.drawable.ic_intro1_6, R.raw.blurp_x),
                  arrayOf(R.drawable.ic_intro1_7, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_8, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_9, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_10, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_11, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_12, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_13, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_14, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_15, R.raw.blurp_x),
                  arrayOf(R.drawable.ic_intro1_16, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_17, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_18, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_19, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_20, R.raw.blurp_x),
                  arrayOf(R.drawable.ic_intro1_21, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_22, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_23, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_24, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_25, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_26, R.raw.blurp_x),
                  arrayOf(R.drawable.ic_intro1_27, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_intro1_28, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_intro1_29, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_intro1_30, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_intro1_31, R.raw.blurp_x)
              )
          else if(title == "Fat-hah Vowel 1")
              contentTitle = arrayOf(
                  arrayOf(R.drawable.ic_fathah1_1, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_fathah1_2, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_fathah1_3, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_fathah1_4, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_fathah1_5, R.raw.blurp_x)
              )
          else
              contentTitle = arrayOf(
                  arrayOf(R.drawable.ic_tbr, R.raw.ahem_x),
                  arrayOf(R.drawable.ic_tbr, R.raw.bad_disk_x),
                  arrayOf(R.drawable.ic_tbr, R.raw.baseball_hit),
                  arrayOf(R.drawable.ic_tbr, R.raw.bloop_x),
                  arrayOf(R.drawable.ic_tbr, R.raw.blurp_x)
              )
          return contentTitle
      }
  }
  </code></pre>
  
  <p>I still have lots more to populate the array but already the app is lagging so i i am thinking of async approach. I googled for Kotlin async methods but saw its about creating new function for it?  Any pointers/advise is very much appreciated. Millions of thanx in advance...</p>