Migrate RawSyscalls' inputs and outputs to arrays.

I didn't originally think of using pattern matching to avoid indexing in RawSyscalls' implementations, which made me avoid using ararys. This switches the code over to using arrays, which simplifies the design of RawSyscalls a bit.
diff --git a/core/platform/src/raw_syscalls.rs b/core/platform/src/raw_syscalls.rs
index cd5115f..5bea527 100644
--- a/core/platform/src/raw_syscalls.rs
+++ b/core/platform/src/raw_syscalls.rs
@@ -64,23 +64,6 @@
 //   unsafe fn syscall2<const CLASS: usize>([*mut (); 2]) -> [*mut (); 4];
 //   unsafe fn syscall4<const CLASS: usize>([*mut (); 4]) -> [*mut (); 4];
 //
-// To avoid making the RawSyscalls implementation index into arrays, we replace
-// the arrays in the input with multiple arguments. For symmetry, we also
-// replace the output with a tuple of individual values. This gives:
-//
-//   unsafe fn yield1(*mut ()) -> (*mut (), *mut (), *mut (), *mut ());
-//
-//   unsafe fn yield2(*mut (), *mut ()) -> (*mut (), *mut (), *mut (), *mut ());
-//
-//   unsafe fn syscall1<const CLASS: usize>(*mut ())
-//       -> (*mut (), *mut (), *mut (), *mut ());
-//
-//   unsafe fn syscall2<const CLASS: usize>(*mut (), *mut ())
-//       -> (*mut (), *mut (), *mut (), *mut ());
-//
-//   unsafe fn syscall4<const CLASS: usize>(*mut (), *mut (), *mut (), *mut ())
-//       -> (*mut (), *mut (), *mut (), *mut ());
-//
 // These system calls are refined further individually, which is documented on
 // a per-function basis.
 pub unsafe trait RawSyscalls {
@@ -103,7 +86,7 @@
     /// # Safety
     /// yield1 may only be used for yield operations that do not return a value.
     /// It is exactly as safe as the underlying system call.
-    unsafe fn yield1(r0: *mut ());
+    unsafe fn yield1(_: [*mut (); 1]);
 
     // yield2 can only be used to call `yield-no-wait`. `yield-no-wait` does not
     // return any values, so to simplify the assembly we omit return arguments.
@@ -123,7 +106,7 @@
     /// # Safety
     /// yield2 may only be used for yield operations that do not return a value.
     /// It has the same safety invariants as the underlying system call.
-    unsafe fn yield2(r0: *mut (), r1: *mut ());
+    unsafe fn yield2(_: [*mut (); 2]);
 
     // syscall1 is only used to invoke Memop operations. Because there are no
     // Memop commands that set r2 or r3, raw_syscall1 only needs to return r0
@@ -152,7 +135,7 @@
     /// This directly makes a system call. It can only be used for core kernel
     /// system calls that accept 1 argument and only overwrite r0 and r1 on
     /// return. It is unsafe any time the underlying system call is unsafe.
-    unsafe fn syscall1<const CLASS: usize>(r0: *mut ()) -> (*mut (), *mut ());
+    unsafe fn syscall1<const CLASS: usize>(_: [*mut (); 1]) -> [*mut (); 2];
 
     // syscall2 is used to invoke Exit as well as Memop operations that take an
     // argument. Memop does not currently use more than 2 registers for its
@@ -177,7 +160,7 @@
     /// `syscall2` directly makes a system call. It can only be used for core
     /// kernel system calls that accept 2 arguments and only overwrite r0 and r1
     /// on return. It is unsafe any time the underlying system call is unsafe.
-    unsafe fn syscall2<const CLASS: usize>(r0: *mut (), r1: *mut ()) -> (*mut (), *mut ());
+    unsafe fn syscall2<const CLASS: usize>(_: [*mut (); 2]) -> [*mut (); 2];
 
     // syscall4 should:
     //     1. Call the syscall class specified by CLASS.
@@ -200,10 +183,5 @@
     /// `syscall4` must NOT be used to invoke yield. Otherwise, it has the same
     /// safety invariants as the underlying system call, which varies depending
     /// on the system call class.
-    unsafe fn syscall4<const CLASS: usize>(
-        r0: *mut (),
-        r1: *mut (),
-        r2: *mut (),
-        r3: *mut (),
-    ) -> (*mut (), *mut (), *mut (), *mut ());
+    unsafe fn syscall4<const CLASS: usize>(_: [*mut (); 4]) -> [*mut (); 4];
 }
diff --git a/core/platform/src/syscalls_impl.rs b/core/platform/src/syscalls_impl.rs
index 6671ad2..ec4ab9a 100644
--- a/core/platform/src/syscalls_impl.rs
+++ b/core/platform/src/syscalls_impl.rs
@@ -19,7 +19,7 @@
             // Flag can be uninitialized here because the kernel promises to
             // only write to it, not read from it. MaybeUninit guarantees that
             // it is safe to write a YieldNoWaitReturn into it.
-            Self::yield2(yield_op::NO_WAIT as *mut (), flag.as_mut_ptr() as *mut ());
+            Self::yield2([yield_op::NO_WAIT as *mut (), flag.as_mut_ptr() as *mut ()]);
 
             // yield-no-wait guarantees it sets (initializes) flag before
             // returning.
@@ -32,7 +32,7 @@
         // requirement. The yield-wait system call cannot trigger undefined
         // behavior on its own in any other way.
         unsafe {
-            Self::yield1(yield_op::WAIT as *mut ());
+            Self::yield1([yield_op::WAIT as *mut ()]);
         }
     }
 }
diff --git a/core/runtime/src/syscalls_impl_riscv.rs b/core/runtime/src/syscalls_impl_riscv.rs
index 2ae90c2..7b6427c 100644
--- a/core/runtime/src/syscalls_impl_riscv.rs
+++ b/core/runtime/src/syscalls_impl_riscv.rs
@@ -4,7 +4,7 @@
     // This yield implementation is currently limited to RISC-V versions without
     // floating-point registers, as it does not mark them clobbered.
     #[cfg(not(any(target_feature = "d", target_feature = "f")))]
-    unsafe fn yield1(r0: *mut ()) {
+    unsafe fn yield1([r0]: [*mut (); 1]) {
         // Safety: This matches the invariants required by the documentation on
         // RawSyscalls::yield1
         unsafe {
@@ -37,7 +37,7 @@
     // This yield implementation is currently limited to RISC-V versions without
     // floating-point registers, as it does not mark them clobbered.
     #[cfg(not(any(target_feature = "d", target_feature = "f")))]
-    unsafe fn yield2(r0: *mut (), r1: *mut ()) {
+    unsafe fn yield2([r0, r1]: [*mut (); 2]) {
         // Safety: This matches the invariants required by the documentation on
         // RawSyscalls::yield2
         unsafe {
@@ -67,7 +67,7 @@
         }
     }
 
-    unsafe fn syscall1<const CLASS: usize>(mut r0: *mut ()) -> (*mut (), *mut ()) {
+    unsafe fn syscall1<const CLASS: usize>([mut r0]: [*mut (); 1]) -> [*mut (); 2] {
         let r1;
         // Safety: This matches the invariants required by the documentation on
         // RawSyscalls::syscall1
@@ -79,10 +79,10 @@
                  options(preserves_flags, nostack, nomem),
             );
         }
-        (r0, r1)
+        [r0, r1]
     }
 
-    unsafe fn syscall2<const CLASS: usize>(mut r0: *mut (), mut r1: *mut ()) -> (*mut (), *mut ()) {
+    unsafe fn syscall2<const CLASS: usize>([mut r0, mut r1]: [*mut (); 2]) -> [*mut (); 2] {
         // Safety: This matches the invariants required by the documentation on
         // RawSyscalls::syscall2
         unsafe {
@@ -93,15 +93,12 @@
                  options(preserves_flags, nostack, nomem)
             );
         }
-        (r0, r1)
+        [r0, r1]
     }
 
     unsafe fn syscall4<const CLASS: usize>(
-        mut r0: *mut (),
-        mut r1: *mut (),
-        mut r2: *mut (),
-        mut r3: *mut (),
-    ) -> (*mut (), *mut (), *mut (), *mut ()) {
+        [mut r0, mut r1, mut r2, mut r3]: [*mut (); 4],
+    ) -> [*mut (); 4] {
         // Safety: This matches the invariants required by the documentation on
         // RawSyscalls::syscall4
         unsafe {
@@ -114,6 +111,6 @@
                  options(preserves_flags, nostack),
             );
         }
-        (r0, r1, r2, r3)
+        [r0, r1, r2, r3]
     }
 }