diff --git a/core/includes/common.inc b/core/includes/common.inc
index 654d849..96818f6 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -6,6 +6,7 @@
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\Yaml\Parser;
 use Drupal\Component\PhpStorage\PhpStorageFactory;
+use Drupal\Component\Utility\MapArray;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Datetime\DrupalDateTime;
@@ -2004,28 +2005,13 @@ function drupal_exit($destination = NULL) {
 /**
  * Forms an associative array from a linear array.
  *
- * This function walks through the provided array and constructs an associative
- * array out of it. The keys of the resulting array will be the values of the
- * input array. The values will be the same as the keys unless a function is
- * specified, in which case the output of the function is used for the values
- * instead.
+ * @deprecated as of Drupal 8.0.
+ *   Use \Drupal\Component\Utility\MapArray::copyValuesToKeys() instead.
  *
- * @param $array
- *   A linear array.
- * @param $function
- *   A name of a function to apply to all values before output.
- *
- * @return
- *   An associative array.
+ * @see \Drupal\Component\Utility\MapArray::copyValuesToKeys()
  */
 function drupal_map_assoc($array, $function = NULL) {
-  // array_combine() fails with empty arrays:
-  // http://bugs.php.net/bug.php?id=34857.
-  $array = !empty($array) ? array_combine($array, $array) : array();
-  if (is_callable($function)) {
-    $array = array_map($function, $array);
-  }
-  return $array;
+  return MapArray::copyValuesToKeys($array, $function);
 }
 
 /**
diff --git a/core/lib/Drupal/Component/Utility/MapArray.php b/core/lib/Drupal/Component/Utility/MapArray.php
new file mode 100644
index 0000000..8aa5ff5
--- /dev/null
+++ b/core/lib/Drupal/Component/Utility/MapArray.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Component\Utility\MapArray.
+ */
+
+namespace Drupal\Component\Utility;
+
+/**
+ * Provides generic array mapping helper methods.
+ */
+class MapArray {
+
+  /**
+   * Forms an associative array from a linear array.
+   *
+   * This function walks through the provided array and constructs an associative
+   * array out of it. The keys of the resulting array will be the values of the
+   * input array. The values will be the same as the keys unless a function is
+   * specified, in which case the output of the function is used for the values
+   * instead.
+   *
+   * @param array $array
+   *   A linear array.
+   * @param callable $function
+   *   A name of a function to apply to all values before output.
+   *
+   * @return array
+   *   An associative array.
+   */
+  public static function copyValuesToKeys(array $array, $function = NULL) {
+    // array_combine() fails with empty arrays:
+    // http://bugs.php.net/bug.php?id=34857.
+    $array = !empty($array) ? array_combine($array, $array) : array();
+    if (is_callable($function)) {
+      $array = array_map($function, $array);
+    }
+    return $array;
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Component/Utility/MapArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/MapArrayTest.php
new file mode 100644
index 0000000..13d984b
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Utility/MapArrayTest.php
@@ -0,0 +1,102 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Utility\MapArrayTest.
+ */
+
+namespace Drupal\Tests\Component\Utility;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\Component\Utility\MapArray;
+
+/**
+ * Tests the MapArray system.
+ *
+ * @see \Drupal\Component\Utility\MapArray
+ */
+class MapArrayTest extends UnitTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'MapArray test',
+      'description' => 'Test that the MapArray functions work properly.',
+      'group' => 'Bootstrap',
+    );
+  }
+
+  /**
+   * Tests MapArray::copyValuesToKey() input against expected output.
+   *
+   * @dataProvider providerCopyValuesToKey
+   *
+   * @param $input
+   *   The input variable for the MapArray::copyValuesToKey() function.
+   * @param $expected
+   *   The expected output from when calling the function.
+   * @param callable $function
+   *   The optional function callback.
+   *
+   * @see Drupal\Component\Utility\MapArray::copyValuesToKey()
+   * @see Drupal\Tests\Component\Utility\MapArrayTest::providerCopyValuesToKey()
+   */
+  public function testCopyValuesToKey($input, $expected, $function = NULL) {
+    $output = MapArray::copyValuesToKeys($input, $function);
+    $this->assertEquals($expected, $output);
+  }
+
+  /**
+   * Data provider for MapArray::copyValuesToKey().
+   *
+   * @return
+   *   An array of tests, matching the parameter inputs for testCopyValuesToKey.
+   *
+   * @see Drupal\Component\Utility\MapArray::copyValuesToKey()
+   * @see Drupal\Tests\Component\Utility\MapArrayTest::testCopyValuesToKey()
+   */
+  public function providerCopyValuesToKey() {
+    // Test an empty array.
+    $tests[] = array(
+      array(),
+      array()
+    );
+
+    // Tests the creation of an associative array.
+    $tests[] = array(
+      array('foobar'),
+      array('foobar' => 'foobar')
+    );
+
+    // Tests overwriting indexes with their value.
+    $tests[] = array(
+      array('foo' => 'bar'),
+      array('bar' => 'bar')
+    );
+
+    // Tests using the callback function.
+    $tests[] = array(
+      array(1, 2, 3, 4, 5),
+      array(
+        1 => 2,
+        2 => 4,
+        3 => 6,
+        4 => 8,
+        5 => 10,
+      ),
+      'Drupal\Tests\Component\Utility\MapArrayTest::providerCopyValuesToKeyCallback',
+    );
+
+    return $tests;
+  }
+
+  /**
+   * Callback for a test in providerCopyValuesToKey(), which doubles the value.
+   *
+   * @param $n
+   *   The value passed in from array_map().
+   */
+  public function providerCopyValuesToKeyCallback($n) {
+     return $n * 2;
+  }
+
+}
