Filter out duplicates from an array and return only unique value
If is possible to improve or write in alternative way logic for
  createArray, maybe a better way in term of code repetition.


Why give the option to mutate the array? Most array methods return a new array, including filter, so it seems redundant in your code, since you get a new array anyway. Not mutating the array is usually the right thing to do. In any case, using JSON to clone an array is very inefficient, when all you need is var copy = array.slice(); and a recursive solution for nested arrays. If you get rid of this unusual requirement, and create your own function instead of extending the prototype, then you are left with what unique really is:

var unique = function(xs) {
  return xs.filter(function(x, i) {
    return xs.indexOf(x) === i
  })
}



  If it is possible to optimize the code for maximum performance and how


If you only deal with things that can be stringified properly, like numbers, and obviously strings, then you can improve performance by using a simple object to keep track of items that have been seen already:

var unique = function(xs) {
  var seen = {}
  return xs.filter(function(x) {
    if (seen[x])
      return
    seen[x] = true
    return x
  })
}


Although this would consider 1 and '1' to be a duplicate.